Automattic\WPSC\Device_Detection
User_Agent_Info::is_uc_browser
Detects if the current browser is UC Browser.
UC Browser is popular in Asia and emerging markets. User agent contains: UCBrowser or UCWEB
Method of the class: User_Agent_Info{}
No Hooks.
Returns
true|false.
Usage
$result = User_Agent_Info::is_uc_browser( $user_agent );
- $user_agent(string|null)
- Optional user agent string.
Default:null
User_Agent_Info::is_uc_browser() User Agent Info::is uc browser code WPSCache 3.1.1
public static function is_uc_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, 'UCBrowser' ) || false !== stripos( $user_agent, 'UCWEB' );
}