deleted_post

Fires immediately after a post is deleted from the database.

Description

add_action( 'deleted_post', (array) $array ); 

Parameters (1)

0. $array (array) => array( __CLASS__, 'flush_cache' )
The array.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'deleted_post', $array ); 
The following example is for adding a hook callback.
  1. // define the deleted_post callback 
  2. function action_deleted_post( $array ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'deleted_post', 'action_deleted_post', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'deleted_post', 'action_deleted_post', 10, 1 ); 

Defined (2)

The action is defined in the following location(s).

/modules/widgets/authors.php  
  1. add_action( 'deleted_post', array( __CLASS__, 'flush_cache' ) ); 
/sync/class.jetpack-sync-module-posts.php  
  1. add_action( 'deleted_post', $callable, 10 );