[wp-trac] [WordPress Trac] #23700: publish_future_post action not working

WordPress Trac noreply at wordpress.org
Thu Mar 7 16:22:16 UTC 2013


#23700: publish_future_post action not working
-------------------------------+------------------------------
 Reporter:  jkoon              |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  General            |     Version:  3.4.2
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |
-------------------------------+------------------------------

Comment (by jkoon):

 1) Add the following to the functions.php file:


 {{{
 add_action ('publish_future_post', 'test_action');

 function test_action () {
         global $post;
         $id = $post->ID;
         update_post_meta($post->ID, 'hook_fired', 'true');
 }
 }}}


 2) Schedule a post to be published in the future.

 3) Review the custom fields data once post has published.

 Expected Results: A custom field named hook_fired added to the post with
 the value of true

 Actual Results: No custom fields added to the post

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23700#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list