Yoast\WP\SEO\Values\Robots
User_Agent_List::get_user_agent()
Gets the user agent object. If it is not yet registered it creates it.
Метод класса: User_Agent_List{}
Хуков нет.
Возвращает
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() User Agent List::get user agent Yoast 23.6
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 ]; }