[wp-hackers] Update post status
Mohammad Jangda
batmoo at gmail.com
Mon Nov 23 05:29:14 UTC 2009
>
> What I'm looking to do is trigger the correct function when the STATUS
> changes. Like I said - when I update the post from DRAFT to FUTURE, is
> there
> something more to do than set the status to FUTURE, and make sure the date
> is in the future?
>
>
You can use the action transition_post_status. Or if you want to trigger
only on specific status changes (i.e. to take action only when a post DRAFT
to FUTURE/PUBLISH) use ${old_status}_to_$new_status.
Details here: http://codex.wordpress.org/Post_Status_Transitions
--
Mo Jangda
www.digitalize.ca | @mjangda
More information about the wp-hackers
mailing list