do_action( 'transition_post_status', string $new_status, string $old_status, WP_Post $post )

Fires when a post is transitioned from one status to another.


Parameters

$new_status

New post status.

$old_status

Old post status.

$post

Post object.


Source

File: wp-includes/post.php

View on GitHub



Changelog

Changelog
Version Description
WP-2.3.0 Introduced.