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
This commit is contained in:
parent
d4e644f226
commit
d2cc17e629
@ -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));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user