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

Yoast\WP\SEO\Actions\Importing

Aioseo_Posttype_Defaults_Settings_Importing_Action::build_mapping() protected Yoast 1.0

Builds the mapping that ties AOISEO option keys with Yoast ones and their data transformation method.

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

Хуков нет.

Возвращает

null. Ничего.

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

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

Код Aioseo_Posttype_Defaults_Settings_Importing_Action::build_mapping() Yoast 17.9

protected function build_mapping() {
	$post_type_objects = \get_post_types( [ 'public' => true ], 'objects' );

	foreach ( $post_type_objects as $pt ) {
		// Use all the custom post types that are public.
		$this->aioseo_options_to_yoast_map[ '/' . $pt->name . '/title' ]                = [
			'yoast_name'       => 'title-' . $pt->name,
			'transform_method' => 'simple_import',
		];
		$this->aioseo_options_to_yoast_map[ '/' . $pt->name . '/metaDescription' ]      = [
			'yoast_name'       => 'metadesc-' . $pt->name,
			'transform_method' => 'simple_import',
		];
		$this->aioseo_options_to_yoast_map[ '/' . $pt->name . '/advanced/showMetaBox' ] = [
			'yoast_name'       => 'display-metabox-pt-' . $pt->name,
			'transform_method' => 'simple_boolean_import',
		];

		if ( $pt->name === 'attachment' ) {
			$this->aioseo_options_to_yoast_map['/attachment/redirectAttachmentUrls'] = [
				'yoast_name'       => 'disable-attachment',
				'transform_method' => 'import_redirect_attachment',
			];
		}
	}
}