W3cubDocs

/WordPress

apply_filters( 'pre_delete_post', bool|null $delete, WP_Post $post, bool $force_delete )

Filters whether a post deletion should take place.

Parameters

$delete

(bool|null) Whether to go forward with deletion.

$post

(WP_Post) Post object.

$force_delete

(bool) Whether to bypass the Trash.

Source

File: wp-includes/post.php

View on Trac

Changelog

Version Description
4.4.0 Introduced.

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