Used By
Used By | Description |
---|---|
wp-includes/post.php: wp_delete_attachment() | Trash or delete an attachment. |
wp-includes/post.php: wp_delete_post() | Trash or delete a post or page. |
Fires immediately before a post is deleted from the database.
(int) Post ID.
(WP_Post) Post object.
Take note, by the time the hook triggers, the post comments and metadata would have already been deleted. Use the before_delete_post hook to catch post deletion before that.
File: wp-includes/post.php
Version | Description |
---|---|
5.5.0 | Added the $post parameter. |
1.2.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/delete_post