Cron improvements from masquerade. #2425

git-svn-id: https://develop.svn.wordpress.org/trunk@3634 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2006-03-07 21:43:59 +00:00
parent 20c6baad57
commit 457b4b5251
5 changed files with 136 additions and 69 deletions

View File

@@ -210,9 +210,10 @@ function wp_insert_post($postarr = array()) {
add_post_meta($post_ID, '_wp_page_template', $page_template, true);
}
if ( 'future' == $post_status )
wp_schedule_event(mysql2date('U', $post_date), 'once', 'publish_future_post', $post_ID);
if ( 'future' == $post_status ) {
wp_schedule_single_event(mysql2date('U', $post_date), 'publish_future_post', $post_ID);
}
do_action('save_post', $post_ID);
do_action('wp_insert_post', $post_ID);