WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Yoast\WP\SEO\Actions\Importing

Abstract_Aioseo_Settings_Importing_Action::index() public Yoast 1.0

Imports AIOSEO settings.

{} Это метод класса: Abstract_Aioseo_Settings_Importing_Action{}

Хуков нет.

Возвращает

Массив|false. An array of the AIOSEO settings that were imported or false if aioseo data was not found.

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

$Abstract_Aioseo_Settings_Importing_Action = new Abstract_Aioseo_Settings_Importing_Action();
$Abstract_Aioseo_Settings_Importing_Action->index();

Код Abstract_Aioseo_Settings_Importing_Action::index() Yoast 17.9

public function index() {
	$limit            = $this->get_limit();
	$aioseo_settings  = $this->query( $limit );
	$created_settings = [];

	$completed = \count( $aioseo_settings ) === 0;
	$this->set_completed( $completed );

	$last_imported_setting = '';

	// Prepare the setting keys mapping.
	$this->build_mapping();

	// Prepare the replacement var mapping.
	foreach ( $this->replace_vars_edited_map as $aioseo_var => $yoast_var ) {
		$this->replacevar_handler->compose_map( $aioseo_var, $yoast_var );
	}

	try {
		foreach ( $aioseo_settings as $setting => $setting_value ) {
			// Map and import the values of the setting we're working with (eg. post, book-category, etc.) to the respective Yoast option.
			$this->map( $setting_value, $setting );

			// Save the type of the settings that were just imported, so that we can allow chunked imports.
			$last_imported_setting = $setting;

			$created_settings[] = $setting;
		}
	}
	finally {
		$cursor_id = $this->get_cursor_id();
		$this->set_cursor( $this->options, $cursor_id, $last_imported_setting );
	}

	return $created_settings;
}