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