W3cubDocs

/WordPress

apply_filters( ‘pre_untrash_post’, bool|null $untrash, WP_Post $post, string $previous_status )

Filters whether a post untrashing should take place.

Parameters

$untrashbool|null
Whether to go forward with untrashing.
$postWP_Post
Post object.
$previous_statusstring
The status of the post at the point where it was trashed.

Source

$check = apply_filters( 'pre_untrash_post', null, $post, $previous_status );

Changelog

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

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