W3cubDocs

/WordPress

do_action( ‘after_delete_post’, int $post_id, WP_Post $post )

Fires after a post is deleted, at the conclusion of wp_delete_post() .

Description

See also

Parameters

$post_idint
Post ID.
$postWP_Post
Post object.

Source

do_action( 'after_delete_post', $post_id, $post );

Changelog

Version Description
5.5.0 Added the $post parameter.
3.2.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/after_delete_post