wp_import_cleanup
Cleanup importer.
Description
wp_import_cleanup( (string) $id );
Removes attachment based on ID.
Parameters (1)
- 0. $id (string)
- Importer ID.
Usage
if ( !function_exists( 'wp_import_cleanup' ) ) { require_once ABSPATH . '/wp-admin/includes/import.php'; } // Importer ID. $id = ''; // NOTICE! Understand what this does before running. $result = wp_import_cleanup($id);
Defined (1)
The function is defined in the following location(s).
- /wp-admin/includes/import.php
- function wp_import_cleanup( $id ) {
- wp_delete_attachment( $id );
- }