Confirm that publish_future_post hook does not work? (3 posts)

  1. jkoon
    Posted 2 years ago #

    Can someone help me confirm that the publish_future_post hook is not working in the latest version of WordPress.

    The reference page says this hook should be executed "when a future post or page is published." When I have schedule a post and it switches to the published status this action does not seem to be executed.

    I have switched to the default theme and have disabled all plugins.


  2. Pattie Reaves
    Posted 1 year ago #

    I would like to know the same thing. the future_to_publish hook isn't working for me either the way I would expect.

  3. jkoon
    Posted 1 year ago #

    I was trying to use global $post in the function which turns out to not be correct. Try using this code:

    function test_action ( $post_id ) {
    	update_post_meta( $post_id, 'hook_fired', 'true' );

    Here is a link to my closed bug report for more information: http://core.trac.wordpress.org/ticket/23700#comment:1

Topic Closed

This topic has been closed to new replies.

About this Topic