Home / APIs / _future_post_hook() – Hook used to schedule publication for a post marked for the future.

Description

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'.

Usage

_future_post_hook( $deprecated, $post );

Parameters

$deprecated
( int ) required – 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().
$post
( WP_Post ) required – Post object.

Returns

void

Source

File name: wordpress/wp-includes/post.php
Lines: 1 to 4 of 4

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

 View on GitHub View on Trac

Called by

    Invoked by

      Calls

      1 to 4 of 4

      • _future_post_hook() – Hook used to schedule publication for a post marked for the future.
      • get_gmt_from_date() – Returns a date in the GMT equivalent.
      • wp_clear_scheduled_hook() – Unschedule all events attached to the specified hook.
      • wp_schedule_single_event() – Schedules an event to run only once.

      Call hooks

      Function name: _future_post_hook
      Plugin ref: WordPress
      Version: 4.9
      Sourcefile: wp-includes/post.php
      File ref: wp-includes/post.php
      API type: private
      Deprecated?: No
      API Letters: _,F,H,P

      Published: 10th March 2017 | Last updated: 10th March 2017

      Information

      Function name: _future_post_hook
      Plugin ref: WordPress
      Version: 4.9
      Sourcefile: wp-includes/post.php
      File ref: wp-includes/post.php
      API type: private
      Deprecated?: No
      API Letters: _,F,H,P

      • Plugins
      • Themes
      • Shortcodes
      • APIs
      • Files
      • Hooks
      • Classes
      • Home
      • Sites
      • Sitemap
      • Blog
      oik-plugins WordPress a2z
      WordPress Dynamic API Reference

      Site:  wp-a2z.org
      © Copyright oik-plugins 2014-2018. All rights reserved.


      Website designed and developed by Herb Miller
      Proudly powered by WordPress and oik plugins