[wp-trac] Re: [WordPress Trac] #8792: Transitions should be called even if the status hasn't changed

WordPress Trac wp-trac at lists.automattic.com
Sun Jan 4 00:49:56 GMT 2009


#8792: Transitions should be called even if the status hasn't changed
-------------------------+--------------------------------------------------
 Reporter:  nbachiyski   |        Owner:  anonymous
     Type:  enhancement  |       Status:  new      
 Priority:  normal       |    Milestone:  2.8      
Component:  General      |      Version:  2.7      
 Severity:  normal       |   Resolution:           
 Keywords:  has-patch    |  
-------------------------+--------------------------------------------------
Changes (by azaozz):

  * type:  defect (bug) => enhancement

Comment:

 Wouldn't it be easier/safer to include the $old_status in the publish_post
 hook:
 {{{
 do_action("${new_status}_$post->post_type", $post->ID, $post,
 $old_status);
 }}}

 There may be plugins that depend on the other actions being called only
 when a transitions occurs/post_status changes.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8792#comment:1>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list