importer_scheduled_cleanup
The WordPress Core importer scheduled cleanup hook.
Description
Parameters (1)
- 0. $wp_delete_attachment (string) =>
'wp_delete_attachment'
- The
wp
delete attachment.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'importer_scheduled_cleanup', $wp_delete_attachment );
- The following example is for adding a hook callback.
- // define the importer_scheduled_cleanup callback
- function action_importer_scheduled_cleanup( $wp_delete_attachment ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'importer_scheduled_cleanup', 'action_importer_scheduled_cleanup', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( 'importer_scheduled_cleanup', 'action_importer_scheduled_cleanup', 10, 1 );
Defined (1)
The action is defined in the following location(s).
- /wp-includes/default-filters.php
- add_action( 'importer_scheduled_cleanup', 'wp_delete_attachment' );