after_delete_post WordPress Action Hook

The after_delete_post hook is called after a post is deleted from the database. It is passed the ID of the post that was deleted.

do_action( 'after_delete_post', int $postid, WP_Post $post ) #

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


Description

Top ↑

See also


Top ↑

Parameters

$postid

(int)Post ID.

$post

(WP_Post)Post object.


Top ↑

Source

File: wp-includes/post.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.5.0Added the $post parameter.
3.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More