wppaste
WordPress

_future_post_hook( int $deprecated, WP_Post $post )

Since
2.3.0
Source
wp-includes/post.php:7838
Hook used to schedule publication for a post marked for the future.

Description

The $post properties used and must exist are 'ID' and 'post_date_gmt'.

Parameters

$deprecatedint
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().
$postWP_Post
Post object.

Uses · 3

Source

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 ) );}

History

Introduced in 2.3.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.7.7 tag, from src/wp-includes/post.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.