Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Talk:Plugin API/Action Reference/publish future post

Does this hook really exist?

Shouldn't this be depreciated? In wp-includes/post.php where wp_transition_post_status() is called, there are only three do_action() calls.

  • do_action( 'transition_post_status', $new_status, $old_status, $post );
  • do_action( "{$old_status}_to_{$new_status}", $post );
  • do_action( "{$new_status}_{$post->post_type}", $post->ID, $post );

publish_future_post does not conform to either of these. If there is another function somewhere where this supposed action hook exists, it needs to be mentioned in the Source File section at the bottom of the page.


I think that actually there is no place where this is called explicitly like that. Rather, I think it is a cron hook. So it is still an action, but it is registered and called with cron, rather than a an actual do_action( 'publish_future_post' ) somewhere. In core, it calls check_and_publish_future_post().
It would definitely be good to add this information to the page.
-Jdgrimes 15:47, 21 July 2014 (UTC)