Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: {$new_status}_{$post->post_type}

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
5139       *
5140       * Therefore, if you are looking to only fire a callback when a post is first
5141       * transitioned to a status, use the {@see 'transition_post_status'} hook instead.
5142       *
5143       * @since 2.3.0
5144       *
5145       * @param int     $post_id Post ID.
5146       * @param WP_Post $post    Post object.
5147       */
5148      do_action( "{$new_status}_{$post->post_type}", $post->ID, $post );
5149 }
5150
5151 /**
5152  * Fires actions after a post, its terms and meta data has been saved.
5153  *
5154  * @since 5.6.0
5155  *
5156  * @param int|WP_Post  $post        The post ID or object that has been saved.
5157  * @param bool         $update      Whether this is an existing post being updated.