WP_Importer::stop_the_insanity() WordPress Method

The WP_Importer::stop_the_insanity() method is used to stop the importer from running more than once. This can be useful if you have a lot of data to import and you don't want the importer to run more than necessary.

WP_Importer::stop_the_insanity() #

Resets global variables that grow out of control during imports.


Source

File: wp-admin/includes/class-wp-importer.php

	public function stop_the_insanity() {
		global $wpdb, $wp_actions;
		// Or define( 'WP_IMPORTING', true );
		$wpdb->queries = array();
		// Reset $wp_actions to keep it from growing out of control.
		$wp_actions = array();
	}

Top ↑

Changelog

Changelog
VersionDescription
3.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.