[wp-trac] Re: [WordPress Trac] #4620: Post status transition actions
WordPress Trac
wp-trac at lists.automattic.com
Mon Jul 30 16:39:32 GMT 2007
#4620: Post status transition actions
-----------------------------+----------------------------------------------
Reporter: ryan | Owner: ryan
Type: defect | Status: closed
Priority: normal | Milestone: 2.3 (trunk)
Component: Administration | Version: 2.3
Severity: normal | Resolution: fixed
Keywords: status workflow |
-----------------------------+----------------------------------------------
Changes (by markjaquith):
* status: new => closed
* resolution: => fixed
Comment:
It's dynamically built... that's why you couldn't find it:
{{{
function wp_transition_post_status($new_status, $old_status, $post) {
if ( $new_status != $old_status ) {
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);
}
}}}
This is really cool, BTW.
--
Ticket URL: <http://trac.wordpress.org/ticket/4620#comment:4>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list