WordPress at Your Fingertips
function is not described

WP_Importer::stop_the_insanity() public WP 3.0.0

Resets global variables that grow out of control during imports.

{} It's a method of the class: WP_Importer{}

No Hooks.

Return

null. Nothing.

Usage

$WP_Importer = new WP_Importer();
$WP_Importer->stop_the_insanity();

Notes

  • Global. wpdb. $wpdb WordPress database abstraction object.
  • Global. Int[]. $wp_actions

Changelog

Since 3.0.0 Introduced.

Code of WP_Importer::stop_the_insanity() WP 5.8.2

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();
}