WPSEO_Plugin_Importer::run_import()publicYoast 1.0

Imports the settings and post meta data from another SEO plugin.

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

Хуков нет.

Возвращает

WPSEO_Import_Status. Import status object.

Использование

$WPSEO_Plugin_Importer = new WPSEO_Plugin_Importer();
$WPSEO_Plugin_Importer->run_import();

Код WPSEO_Plugin_Importer::run_import() Yoast 22.3

public function run_import() {
	$this->status = new WPSEO_Import_Status( 'import', false );

	if ( ! $this->detect() ) {
		return $this->status;
	}

	$this->status->set_status( $this->import() );

	// Flush the entire cache, as we no longer know what's valid and what's not.
	wp_cache_flush();

	return $this->status;
}