Title: _future_post_hook
Published: April 25, 2014
Last modified: February 24, 2026

---

# _future_post_hook( int $deprecated, WP_Post $post )

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/_future_post_hook/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/functions/_future_post_hook/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/functions/_future_post_hook/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/_future_post_hook/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/_future_post_hook/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/_future_post_hook/?output_format=md#wp--skip-link--target)

This function’s access is marked private. This means it is not intended for use 
by plugin or theme developers, only by core. It is listed here for completeness.

Hook used to schedule publication for a post marked for the future.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/_future_post_hook/?output_format=md#description)󠁿

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

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/_future_post_hook/?output_format=md#parameters)󠁿

 `$deprecated`intrequired

Not used. Can be set to null. Never implemented. Not marked as deprecated with [_deprecated_argument()](https://developer.wordpress.org/reference/functions/_deprecated_argument/)
as it conflicts with [wp_transition_post_status()](https://developer.wordpress.org/reference/functions/wp_transition_post_status/)
and the default filter for [_future_post_hook()](https://developer.wordpress.org/reference/functions/_future_post_hook/).

More Arguments from _future_post_hook( … $deprecated )

Not used. Can be set to null. Never implemented. Not marked as deprecated with [_deprecated_argument()](https://developer.wordpress.org/reference/functions/_deprecated_argument/)
as it conflicts with [wp_transition_post_status()](https://developer.wordpress.org/reference/functions/wp_transition_post_status/)
and the default filter for [_future_post_hook()](https://developer.wordpress.org/reference/functions/_future_post_hook/).

`$post`[WP_Post](https://developer.wordpress.org/reference/classes/wp_post/)required

Post object.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/_future_post_hook/?output_format=md#source)󠁿

    ```php
    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 all references](https://developer.wordpress.org/reference/files/wp-includes/post.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/post.php#L7983)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/post.php#L7983-L7986)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/_future_post_hook/?output_format=md#related)󠁿

| Uses | Description | 
| [wp_clear_scheduled_hook()](https://developer.wordpress.org/reference/functions/wp_clear_scheduled_hook/)`wp-includes/cron.php` |

Unschedules all events attached to the hook with the specified arguments.

  | 
| [wp_schedule_single_event()](https://developer.wordpress.org/reference/functions/wp_schedule_single_event/)`wp-includes/cron.php` |

Schedules an event to run only once.

  | 
| [get_gmt_from_date()](https://developer.wordpress.org/reference/functions/get_gmt_from_date/)`wp-includes/formatting.php` |

Given a date in the timezone of the site, returns that date in UTC.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/_future_post_hook/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.3.0](https://developer.wordpress.org/reference/since/2.3.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2F_future_post_hook%2F)
before being able to contribute a note or feedback.