From d2cc17e62999f363762bd4413e1f54e438a9fe57 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Wed, 8 Aug 2007 04:08:06 +0000 Subject: [PATCH] Clear old future post cron entry before creating the authoritative one. Props Barry. fixes #4710 git-svn-id: https://develop.svn.wordpress.org/trunk@5853 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/post.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-includes/post.php b/wp-includes/post.php index 61e4bfe112..f400190b32 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1834,6 +1834,7 @@ function _transition_post_status($new_status, $old_status, $post) { function _future_post_hook($post_id, $post) { // Schedule publication. + wp_clear_scheduled_hook( 'publish_future_post', $post->ID ); wp_schedule_single_event(strtotime($post->post_date_gmt. ' GMT'), 'publish_future_post', array($post->ID)); }