Automattic\WPSC\Device_Detection
User_Agent_Info::is_yandex_browser
Detects if the current browser is Yandex Browser.
Yandex Browser is popular in Russia and CIS countries. User agent contains: YaBrowser
Method of the class: User_Agent_Info{}
No Hooks.
Returns
true|false.
Usage
$result = User_Agent_Info::is_yandex_browser( $user_agent );
- $user_agent(string|null)
- Optional user agent string.
Default:null
User_Agent_Info::is_yandex_browser() User Agent Info::is yandex browser code 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' );
}