Make WordPress Core


Ignore:
Timestamp:
08/07/2006 04:43:38 AM (18 years ago)
Author:
ryan
Message:

Always clears future publication hook in case the post status bounced from future to draft.

File:
1 edited

Legend:

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

    r4077 r4078  
    689689    }
    690690
    691     if ( 'future' == $post_status ) {
    692         wp_clear_scheduled_hook('publish_future_post', $post_ID);
     691    // Always clears the hook in case the post status bounced from future to draft.
     692    wp_clear_scheduled_hook('publish_future_post', $post_ID);
     693
     694    // Schedule publication.
     695    if ( 'future' == $post_status )
    693696        wp_schedule_single_event(mysql2date('U', $post_date), 'publish_future_post', $post_ID);
    694     }
    695697       
    696698    do_action('save_post', $post_ID);
Note: See TracChangeset for help on using the changeset viewer.