transition_post_status

transition_post_status

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.5.2

do_action('transition_post_status') is found 1 times:

  • /wp-includes/post.php line 5458
    	 * @param string  $new_status New post status.
    	 * @param string  $old_status Old post status.
    	 * @param WP_Post $post       Post object.
    	 */
    	do_action( 'transition_post_status', $new_status, $old_status, $post );
    
    	/**
    	 * Fires when a post is transitioned from one status to another.
    	 *
    	 * The dynamic portions of the hook name, `$new_status` and `$old_status`,
    	 * refer to the old and new post statuses, respectively.
    

See this hook used in plugins: