Yoast\WP\SEO\Values\Robots

User_Agent_List::get_user_agent()publicYoast 1.0

Gets the user agent object. If it is not yet registered it creates it.

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

Хуков нет.

Возвращает

\Yoast\WP\SEO\Values\Robots\User_Agent.

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

$User_Agent_List = new User_Agent_List();
$User_Agent_List->get_user_agent( $user_agent );
$user_agent(строка) (обязательный)
The user agent identifier.

Код User_Agent_List::get_user_agent() Yoast 19.10

public function get_user_agent( $user_agent ) {
	if ( $this->has_user_agent( $user_agent ) ) {
		return $this->user_agent_list[ $user_agent ];
	}

	$this->user_agent_list[ $user_agent ] = new User_Agent( $user_agent );

	return $this->user_agent_list[ $user_agent ];
}