Changeset 3514 for trunk/wp-includes/functions-post.php
- Timestamp:
- 02/12/2006 07:41:56 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions-post.php
r3511 r3514 72 72 $post_date_gmt = get_gmt_from_date($post_date); 73 73 } 74 75 if ( 'publish' == $post_status && (mysql2date('U', $post_date_gmt) > time()) ) 76 $post_status = 'future'; 74 77 75 78 if ( empty($comment_status) ) { … … 204 207 add_post_meta($post_ID, '_wp_page_template', $page_template, true); 205 208 } 209 210 if ( 'future' == $post_status ) 211 wp_schedule_event(mysql2date('U', $post_date_gmt), 'once', 'publish_future_post', $post_ID); 206 212 207 213 do_action('save_post', $post_ID); … … 456 462 } 457 463 464 function wp_publish_post($post_id) { 465 $post = get_post($post_id); 466 467 if ( empty($post) ) 468 return; 469 470 if ( 'publish' == $post->post_status ) 471 return; 472 473 return wp_update_post(array('post_status' => 'publish', 'ID' => $post_id)); 474 } 475 458 476 function wp_get_post_cats($blogid = '1', $post_ID = 0) { 459 477 global $wpdb;
Note: See TracChangeset
for help on using the changeset viewer.