Yoast\WP\SEO\Actions\Importing\Aioseo

Aioseo_Validate_Data_Action::validate_aioseo_settings()publicYoast 1.0

Validates the AIOSEO settings from the options table.

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

Хуков нет.

Возвращает

true|false. Whether the AIOSEO settings from the options table exist and have the structure we expect.

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

$Aioseo_Validate_Data_Action = new Aioseo_Validate_Data_Action();
$Aioseo_Validate_Data_Action->validate_aioseo_settings();

Код Aioseo_Validate_Data_Action::validate_aioseo_settings() Yoast 19.2

public function validate_aioseo_settings() {
	foreach ( $this->settings_importing_actions as $settings_import_action ) {
		$aioseo_settings = \json_decode( \get_option( $settings_import_action->get_source_option_name(), '' ), true );

		if ( ! $settings_import_action->isset_settings_tab( $aioseo_settings ) ) {
			return false;
		}
	}

	return true;
}