Automattic\WPSC\Device_Detection

User_Agent_Info::is_yandex_browserpublic staticWPSCache 1.0

Detects if the current browser is Yandex Browser.

Yandex Browser is popular in Russia and CIS countries. User agent contains: YaBrowser

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

Хуков нет.

Возвращает

true|false.

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

$result = User_Agent_Info::is_yandex_browser( $user_agent );
$user_agent(строка|null)
Optional user agent string.
По умолчанию: null

Код User_Agent_Info::is_yandex_browser() WPSCache 3.1.1

public static function is_yandex_browser( $user_agent = null ) {
	$user_agent = self::maybe_get_user_agent_from_server( $user_agent );
	if ( empty( $user_agent ) ) {
		return false;
	}

	return false !== stripos( $user_agent, 'YaBrowser' );
}