From eb8c1d336edd4929190b152ab8692924053a589f Mon Sep 17 00:00:00 2001 From: westi Date: Thu, 24 Dec 2009 11:24:32 +0000 Subject: [PATCH] Update wp_clear_scheduled_hook calls to use array when passing args. Fixes #11590 props nacin. git-svn-id: http://svn.automattic.com/wordpress/trunk@12538 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index efa616745d..f62183006f 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1251,7 +1251,7 @@ function wp_delete_post( $postid = 0, $force_delete = false ) { clean_post_cache($postid); } - wp_clear_scheduled_hook('publish_future_post', $postid); + wp_clear_scheduled_hook('publish_future_post', array( $postid ) ); do_action('deleted_post', $postid); @@ -1928,7 +1928,7 @@ function check_and_publish_future_post($post_id) { $time = strtotime( $post->post_date_gmt . ' GMT' ); if ( $time > time() ) { // Uh oh, someone jumped the gun! - wp_clear_scheduled_hook( 'publish_future_post', $post_id ); // clear anything else in the system + wp_clear_scheduled_hook( 'publish_future_post', array( $post_id ) ); // clear anything else in the system wp_schedule_single_event( $time, 'publish_future_post', array( $post_id ) ); return; } @@ -3524,7 +3524,7 @@ function _transition_post_status($new_status, $old_status, $post) { } // Always clears the hook in case the post status bounced from future to draft. - wp_clear_scheduled_hook('publish_future_post', $post->ID); + wp_clear_scheduled_hook('publish_future_post', array( $post->ID ) ); } /** @@ -3539,7 +3539,7 @@ function _transition_post_status($new_status, $old_status, $post) { * @param object $post Object type containing the post information */ function _future_post_hook($deprecated = '', $post) { - wp_clear_scheduled_hook( 'publish_future_post', $post->ID ); + wp_clear_scheduled_hook( 'publish_future_post', array( $post->ID ) ); wp_schedule_single_event(strtotime($post->post_date_gmt. ' GMT'), 'publish_future_post', array($post->ID)); }