|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.
|5.5.0||Added the |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.