after_delete_post
Fires after a post is deleted, at the conclusion of wp_delete_post().
Description
Parameters (1)
- 0. $postid (int)
- The postid.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'after_delete_post', $postid );
- The following example is for adding a hook callback.
- // define the after_delete_post callback
- function action_after_delete_post( $postid ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'after_delete_post', 'action_after_delete_post', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( 'after_delete_post', 'action_after_delete_post', 10, 1 );
Defined (1)
The action is defined in the following location(s).
- /wp-includes/post.php
- do_action( 'after_delete_post', $postid );