do_action( ‘deleted_post’, int $postid, WP_Post $post )

In this article

Fires immediately after a post is deleted from the database.

Parameters

$postidint
Post ID.
$postWP_Post
Post object.

Source

do_action( 'deleted_post', $postid, $post );

Changelog

VersionDescription
5.5.0Added the $post parameter.
2.2.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.