_future_post_hook

The timeline below displays how wordpress function _future_post_hook has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 4.6

/**
 * Hook used to schedule publication for a post marked for the future.
 *
 * The $post properties used and must exist are 'ID' and 'post_date_gmt'.
 *
 * @since 2.3.0
 * @access private
 *
 * @param int     $deprecated Not used. Can be set to null. Never implemented. Not marked
 *                            as deprecated with _deprecated_argument() as it conflicts with
 *                            wp_transition_post_status() and the default filter for _future_post_hook().
 * @param WP_Post $post       Post object.
 */
function _future_post_hook($deprecated, $post)
{
    wp_clear_scheduled_hook('publish_future_post', array($post->ID));
    wp_schedule_single_event(strtotime(get_gmt_from_date($post->post_date) . ' GMT'), 'publish_future_post', array($post->ID));
}

WordPress Version: 4.0

/**
 * Hook used to schedule publication for a post marked for the future.
 *
 * The $post properties used and must exist are 'ID' and 'post_date_gmt'.
 *
 * @since 2.3.0
 * @access private
 *
 * @param int     $deprecated Not used. Can be set to null. Never implemented. Not marked
 *                            as deprecated with _deprecated_argument() as it conflicts with
 *                            wp_transition_post_status() and the default filter for
 *                            {@see _future_post_hook()}.
 * @param WP_Post $post       Post object.
 */
function _future_post_hook($deprecated, $post)
{
    wp_clear_scheduled_hook('publish_future_post', array($post->ID));
    wp_schedule_single_event(strtotime(get_gmt_from_date($post->post_date) . ' GMT'), 'publish_future_post', array($post->ID));
}

WordPress Version: 3.7

/**
 * Hook used to schedule publication for a post marked for the future.
 *
 * The $post properties used and must exist are 'ID' and 'post_date_gmt'.
 *
 * @since 2.3.0
 * @access private
 *
 * @param int $deprecated Not used. Can be set to null. Never implemented.
 *   Not marked as deprecated with _deprecated_argument() as it conflicts with
 *   wp_transition_post_status() and the default filter for _future_post_hook().
 * @param object $post Object type containing the post information
 */
function _future_post_hook($deprecated, $post)
{
    wp_clear_scheduled_hook('publish_future_post', array($post->ID));
    wp_schedule_single_event(strtotime(get_gmt_from_date($post->post_date) . ' GMT'), 'publish_future_post', array($post->ID));
}