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.7.2

do_action('transition_post_status') is found 1 times:

  • /wp-includes/post.php line 5690
    5686
    5687
    5688
    5689
    5690
    5691
    5692
    5693
    5694
    5695
    5696
    * @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: