transition_post_status WordPress Action Hook

The transition_post_status hook is triggered when the post status is changed. It is an action hook that is called after a post is updated.

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

(string)New post status.

$old_status

(string)Old post status.

$post

(WP_Post)Post object.


Top ↑

Source

File: wp-includes/post.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More