WordPress.org

Make WordPress Core

Changeset 12538


Ignore:
Timestamp:
12/24/2009 11:24:32 AM (8 years ago)
Author:
westi
Message:

Update wp_clear_scheduled_hook calls to use array when passing args. Fixes #11590 props nacin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r12517 r12538  
    12521252    }
    12531253
    1254     wp_clear_scheduled_hook('publish_future_post', $postid);
     1254    wp_clear_scheduled_hook('publish_future_post', array( $postid ) );
    12551255
    12561256    do_action('deleted_post', $postid);
     
    19291929
    19301930    if ( $time > time() ) { // Uh oh, someone jumped the gun!
    1931         wp_clear_scheduled_hook( 'publish_future_post', $post_id ); // clear anything else in the system
     1931        wp_clear_scheduled_hook( 'publish_future_post', array( $post_id ) ); // clear anything else in the system
    19321932        wp_schedule_single_event( $time, 'publish_future_post', array( $post_id ) );
    19331933        return;
     
    35253525
    35263526    // Always clears the hook in case the post status bounced from future to draft.
    3527     wp_clear_scheduled_hook('publish_future_post', $post->ID);
     3527    wp_clear_scheduled_hook('publish_future_post', array( $post->ID ) );
    35283528}
    35293529
     
    35403540 */
    35413541function _future_post_hook($deprecated = '', $post) {
    3542     wp_clear_scheduled_hook( 'publish_future_post', $post->ID );
     3542    wp_clear_scheduled_hook( 'publish_future_post', array( $post->ID ) );
    35433543    wp_schedule_single_event(strtotime($post->post_date_gmt. ' GMT'), 'publish_future_post', array($post->ID));
    35443544}
Note: See TracChangeset for help on using the changeset viewer.