W3cubDocs

/WordPress

do_action( ‘untrash_post’, int $post_id, string $previous_status )

Fires before a post is restored from the Trash.

Parameters

$post_idint
Post ID.
$previous_statusstring
The status of the post at the point where it was trashed.

Source

do_action( 'untrash_post', $post_id, $previous_status );

Changelog

Version Description
5.6.0 Added the $previous_status parameter.
2.9.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/untrash_post