Used By
Used By | Description |
---|---|
wp-includes/post.php: wp_delete_post() | Trash or delete a post or page. |
Fires before a post is deleted, at the start of wp_delete_post().
(int) Post ID.
(WP_Post) Post object.
It’s important to note the hook runs only when the WordPress user empties the Trash. If you’re using this hook note that it will not fire if the user is deleting an Attachment, since attachments are force deleted, i.e., not sent to the Trash. Instead use the delete_post() hook.
File: wp-includes/post.php
Version | Description |
---|---|
5.5.0 | Added the $post parameter. |
3.2.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/before_delete_post