Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: transition_post_status

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
3956      /**
3957       * Fires when a post is transitioned from one status to another.
3958       *
3959       * @since 2.3.0
3960       *
3961       * @param string  $new_status New post status.
3962       * @param string  $old_status Old post status.
3963       * @param WP_Post $post       Post object.
3964       */
3965      do_action( 'transition_post_status', $new_status, $old_status, $post );
3966
3967      /**
3968       * Fires when a post is transitioned from one status to another.
3969       *
3970       * The dynamic portions of the hook name, `$new_status` and `$old status`,
3971       * refer to the old and new post statuses, respectively.
3972       *
3973       * @since 2.3.0
3974       *