Fires immediately before a post is deleted from the database.
The dynamic portion of the hook name, $post->post_type, refers to the post type slug.
$post_idint
$postWP_Post
do_action( "delete_post_{$post->post_type}", $post_id, $post );
| Version | Description |
|---|---|
| 6.6.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/delete_post_post-post_type