WordPress.org

Ready to get started?Download WordPress

Codex

Plugin API/Action Reference/publish future post

Description

publish_future_post is an action triggered when a post is transitioned from 'future' to 'publish' status (see Post Status Transitions)

Example

add_action('publish_future_post', 'my_test_future_post');

function my_test_future_post($post_id)
	update_post_meta( $post_id, 'hook_fired', 'true' );
}

Notes/Reference

Important: As the links below explain, the action sends in the post_id of the post that transitioned from future to published so you can act on it. Your hook function must declare the parameter (e.g. $post_id).

http://wordpress.org/support/topic/confirm-that-publish_future_post-hook-does-not-work https://core.trac.wordpress.org/ticket/23700#comment:1

This page is marked as incomplete. You can help Codex by expanding it.