mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
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) {
|
||||
// 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