Clear old future post cron entry before creating the authoritative one. Props Barry. fixes #4710
git-svn-id: http://svn.automattic.com/wordpress/trunk@5853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
44df30f2d6
commit
5c83a39e33
@ -1834,6 +1834,7 @@ function _transition_post_status($new_status, $old_status, $post) {
|
|||||||
|
|
||||||
function _future_post_hook($post_id, $post) {
|
function _future_post_hook($post_id, $post) {
|
||||||
// Schedule publication.
|
// 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));
|
wp_schedule_single_event(strtotime($post->post_date_gmt. ' GMT'), 'publish_future_post', array($post->ID));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user