apply_filters( ‘pre_delete_post’, WP_Post|false|null $delete, WP_Post $post, bool $force_delete )

In this article

Filters whether a post deletion should take place.

Parameters

$deleteWP_Post|false|null
Whether to go forward with deletion.
$postWP_Post
Post object.
$force_deletebool
Whether to bypass the Trash.

Source

$check = apply_filters( 'pre_delete_post', null, $post, $force_delete );

Changelog

VersionDescription
4.4.0Introduced.

User Contributed Notes

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