upgrader_scheduled_cleanup

The WordPress Core upgrader scheduled cleanup hook.

Description

add_action( 'upgrader_scheduled_cleanup', (string) $wp_delete_attachment ); 

Parameters (1)

0. $wp_delete_attachment (string) => 'wp_delete_attachment'
The wp delete attachment.

Usage

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

Defined (1)

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

/wp-includes/default-filters.php  
  1. add_action( 'upgrader_scheduled_cleanup', 'wp_delete_attachment' );