You appear to be a bot. Output may be restricted
Description
Imports AIOSEO settings.
Usage
$array|false = Abstract_Aioseo_Settings_Importing_Action::index();
Parameters
Returns
array|false An array of the AIOSEO settings that were imported or false if aioseo data was not found.
Source
File name: wordpress-seo/src/actions/importing/aioseo/abstract-aioseo-settings-importing-action.php
Lines:
1 to 35 of 35
public function index() { $limit = $this->get_limit(); $aioseo_settings = $this->query( $limit ); $created_settings = []; $completed = \count( $aioseo_settings ) === 0; $this->set_completed( $completed ); // 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 ); } $last_imported_setting = ''; 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->import_cursor->set_cursor( $cursor_id, $last_imported_setting ); } return $created_settings; }