Changeset 6985
- Timestamp:
- 02/22/2008 07:59:12 PM (17 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/default-filters.php
r6974 r6985 161 161 add_action('wp_head', 'wlwmanifest_link'); 162 162 add_action('wp_head', 'locale_stylesheet'); 163 add_action('publish_future_post', ' wp_publish_post', 10, 1);163 add_action('publish_future_post', 'check_and_publish_future_post', 10, 1); 164 164 add_action('wp_head', 'noindex', 1); 165 165 add_action('wp_head', 'wp_print_scripts'); -
trunk/wp-includes/post.php
r6983 r6985 1394 1394 } 1395 1395 1396 /** 1397 * check_and_publish_future_post() - check to make sure post has correct status before 1398 * passing it on to be published. Invoked by cron 'publish_future_post' event 1399 * This safeguard prevents cron from publishing drafts, etc. 1400 * 1401 * {@internal Missing Long Description}} 1402 * 1403 * @package WordPress 1404 * @subpackage Post 1405 * @since 2.5 1406 * @uses $wpdb 1407 * 1408 * @param int $post_id Post ID 1409 * @return int|null {@internal Missing Description}} 1410 */ 1411 function check_and_publish_future_post($post_id) { 1412 1413 $post = get_post($post_id); 1414 1415 if ( empty($post) ) 1416 return; 1417 1418 if ( 'future' != $post->post_status ) 1419 return; 1420 1421 return wp_publish_post($post_id); 1422 } 1423 1396 1424 function wp_add_post_tags($post_id = 0, $tags = '') { 1397 1425 return wp_set_post_tags($post_id, $tags, true);
Note: See TracChangeset
for help on using the changeset viewer.