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

In this article

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

VersionDescription
5.6.0Added the $previous_status parameter.
4.9.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.