Yoast\WP\SEO\Values\Robots

User_Agent_List::get_allow_directives()publicYoast 1.0

Gets a list of all sallow directives by user agent.

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

Хуков нет.

Возвращает

Массив.

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

$User_Agent_List = new User_Agent_List();
$User_Agent_List->get_allow_directives();

Код User_Agent_List::get_allow_directives() Yoast 19.11

public function get_allow_directives() {
	$directives = [];
	foreach ( $this->user_agent_list as $user_agent ) {
		$directives[ $user_agent->get_user_agent() ] = $user_agent->get_allow_paths();
	}

	return $directives;
}