WPSEO_Import_RankMath::import()protectedYoast 1.0

Handles post meta data to import.

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

Хуков нет.

Возвращает

true|false. Import success status.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->import();

Код WPSEO_Import_RankMath::import() Yoast 22.4

protected function import() {
	global $wpdb;
	// Replace % with %% as their variables are the same except for that.
	$wpdb->query( "UPDATE $wpdb->postmeta SET meta_value = REPLACE( meta_value, '%', '%%' ) WHERE meta_key IN ( 'rank_math_description', 'rank_math_title' )" );

	$this->import_meta_robots();
	$return = $this->meta_keys_clone( $this->clone_keys );

	// Return %% to % so our import is non-destructive.
	$wpdb->query( "UPDATE $wpdb->postmeta SET meta_value = REPLACE( meta_value, '%%', '%' ) WHERE meta_key IN ( 'rank_math_description', 'rank_math_title' )" );

	if ( $return ) {
		$this->import_settings();
	}

	return $return;
}