WP_Importer::stop_the_insanity()publicWP 3.0.0

Resets global variables that grow out of control during imports.

Метод класса: WP_Importer{}

Хуков нет.


null. Ничего (null).


$WP_Importer = new WP_Importer();


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

Список изменений

С версии 3.0.0 Введена.

Код WP_Importer::stop_the_insanity() WP 6.5.3

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