Yoast\WP\SEO\Services\Importing\Aioseo

Aioseo_Robots_Provider_Service::get_subtype_robot_setting()publicYoast 1.0

Gets the subtype's robot setting from the db.

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

Хуков нет.

Возвращает

true|false. The robot setting.

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

$Aioseo_Robots_Provider_Service = new Aioseo_Robots_Provider_Service();
$Aioseo_Robots_Provider_Service->get_subtype_robot_setting( $mapping );
$mapping(массив) (обязательный)
The mapping of the setting we're working with.

Код Aioseo_Robots_Provider_Service::get_subtype_robot_setting() Yoast 19.2

public function get_subtype_robot_setting( $mapping ) {
	$aioseo_settings = \json_decode( \get_option( $mapping['option_name'], '' ), true );

	return $aioseo_settings['searchAppearance'][ $mapping['type'] ][ $mapping['subtype'] ]['advanced']['robotsMeta'][ $mapping['robot_type'] ];
}