Yoast\WP\SEO\Actions\Importing\Aioseo

Aioseo_Validate_Data_Action::index()publicYoast 1.0

Validates AIOSEO data.

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

Хуков нет.

Возвращает

Массив|false. An array of validated data or false if aioseo data did not pass validation.

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

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

Код Aioseo_Validate_Data_Action::index() Yoast 19.2

public function index() {
	if ( $this->get_completed() ) {
		return [];
	}

	$validated_aioseo_table    = $this->validate_aioseo_table();
	$validated_aioseo_settings = $this->validate_aioseo_settings();
	$validated_robot_settings  = $this->validate_robot_settings();


	if ( $validated_aioseo_table === false || $validated_aioseo_settings === false || $validated_robot_settings === false ) {
		throw new Aioseo_Validation_Exception();
	}

	$this->set_completed( true );

	return [
		'validated_aioseo_table'    => $validated_aioseo_table,
		'validated_aioseo_settings' => $validated_aioseo_settings,
		'validated_robot_settings'  => $validated_robot_settings,
	];
}