wp_import_cleanup() WordPress Function

The wp_import_cleanup() function is used to clean up after an import operation. This function should be called after importing data from an external source. It will remove any unused data that was imported, and it will also update any imported data that has changed since the last import.

wp_import_cleanup( string $id ) #

Cleanup importer.


Description

Removes attachment based on ID.


Top ↑

Parameters

$id

(string)(Required)Importer ID.


Top ↑

Source

File: wp-admin/includes/import.php

function wp_import_cleanup( $id ) {
	wp_delete_attachment( $id );
}


Top ↑

Changelog

Changelog
VersionDescription
2.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.