Constants

PLATFORM_WINDOWS

PLATFORM_WINDOWS

PLATFORM_IPHONE

PLATFORM_IPHONE

PLATFORM_IPOD

PLATFORM_IPOD

PLATFORM_IPAD

PLATFORM_IPAD

PLATFORM_BLACKBERRY

PLATFORM_BLACKBERRY

PLATFORM_BLACKBERRY_10

PLATFORM_BLACKBERRY_10

PLATFORM_SYMBIAN

PLATFORM_SYMBIAN

PLATFORM_SYMBIAN_S40

PLATFORM_SYMBIAN_S40

PLATFORM_J2ME_MIDP

PLATFORM_J2ME_MIDP

PLATFORM_ANDROID

PLATFORM_ANDROID

PLATFORM_ANDROID_TABLET

PLATFORM_ANDROID_TABLET

PLATFORM_FIREFOX_OS

PLATFORM_FIREFOX_OS

Properties

$useragent

$useragent

$matched_agent

$matched_agent

$isTierIphone

$isTierIphone

$isTierRichCss

$isTierRichCss

$isTierGenericMobile

$isTierGenericMobile

$dumb_agents

$dumb_agents

$_platform

$_platform

Methods

Jetpack_User_Agent_Info()

Jetpack_User_Agent_Info()

get_mobile_user_agent_name()

get_mobile_user_agent_name() : string

This method detects the mobile User Agent name.

Returns

string —

The matched User Agent name, false otherwise.

get_platform()

get_platform() : string

This method detects the mobile device's platform. All return strings are from the class constants.

Note that this function returns the platform name, not the UA name/type. You should use a different function if you need to test the UA capabilites.

Returns

string —

Name of the platform, false otherwise.

isTierIphone()

isTierIphone()

isTierRichCss()

isTierRichCss()

is_tablet()

is_tablet()

is_iphoneOrIpod()

is_iphoneOrIpod()

is_iphone_or_ipod()

is_iphone_or_ipod( $type)

Parameters

$type

is_chrome_for_iOS()

is_chrome_for_iOS()

is_twitter_for_iphone()

is_twitter_for_iphone()

is_twitter_for_ipad()

is_twitter_for_ipad()

is_facebook_for_iphone()

is_facebook_for_iphone()

is_facebook_for_ipad()

is_facebook_for_ipad()

is_wordpress_for_ios()

is_wordpress_for_ios()

is_ipad()

is_ipad( $type)

Parameters

$type

is_firefox_mobile()

is_firefox_mobile()

is_firefox_os()

is_firefox_os()

is_opera_mobile()

is_opera_mobile()

is_opera_mini()

is_opera_mini()

is_opera_mini_dumb()

is_opera_mini_dumb()

is_OperaMobile()

is_OperaMobile()

is_WindowsPhone7()

is_WindowsPhone7()

is_windows_phone_8()

is_windows_phone_8()

is_PalmWebOS()

is_PalmWebOS()

is_TouchPad()

is_TouchPad()

is_S60_OSSBrowser()

is_S60_OSSBrowser()

is_symbian_platform()

is_symbian_platform()

is_symbian_s40_platform()

is_symbian_s40_platform()

is_J2ME_platform()

is_J2ME_platform()

is_MaemoTablet()

is_MaemoTablet()

is_MeeGo()

is_MeeGo()

is_webkit()

is_webkit()

is_android()

is_android() : boolean

Detects if the current browser is the Native Android browser.

Returns

boolean —

true if the browser is Android otherwise false

is_android_tablet()

is_android_tablet() : boolean

Detects if the current browser is the Native Android Tablet browser.

Assumes 'Android' should be in the user agent, but not 'mobile'

Returns

boolean —

true if the browser is Android and not 'mobile' otherwise false

is_kindle_fire()

is_kindle_fire() : boolean

Detects if the current browser is the Kindle Fire Native browser.

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-84) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-84) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=false

Returns

boolean —

true if the browser is Kindle Fire Native browser otherwise false

is_kindle_touch()

is_kindle_touch() : boolean

Detects if the current browser is the Kindle Touch Native browser

Mozilla/5.0 (X11; U; Linux armv7l like Android; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/533.2+ Kindle/3.0+

Returns

boolean —

true if the browser is Kindle monochrome Native browser otherwise false

is_windows8_auth()

is_windows8_auth()

is_wordpress_for_win8()

is_wordpress_for_win8()

is_blackberry_tablet()

is_blackberry_tablet()

is_blackbeberry()

is_blackbeberry()

is_blackberry_10()

is_blackberry_10()

get_blackbeberry_OS_version()

get_blackbeberry_OS_version() : string

Retrieve the blackberry OS version.

Return strings are from the following list:

  • blackberry-10
  • blackberry-7
  • blackberry-6
  • blackberry-torch //only the first edition. The 2nd edition has the OS7 onboard and doesn't need any special rule.
  • blackberry-5
  • blackberry-4.7
  • blackberry-4.6
  • blackberry-4.5

Returns

string —

Version of the BB OS. If version is not found, get_blackbeberry_OS_version will return boolean false.

detect_blackberry_browser_version()

detect_blackberry_browser_version() : string

Retrieve the blackberry browser version.

Return string are from the following list:

  • blackberry-10
  • blackberry-webkit
  • blackberry-5
  • blackberry-4.7
  • blackberry-4.6

Returns

string —

Type of the BB browser. If browser's version is not found, detect_blackbeberry_browser_version will return boolean false.

is_mobile_app()

is_mobile_app()

is_bot()

is_bot() : boolean

Was the current request made by a known bot?

Returns

boolean

is_bot_user_agent()

is_bot_user_agent(mixed $ua) : boolean

Is the given user-agent a known bot? If you want an is_bot check for the current request's UA, use is_bot() instead of passing a user-agent to this method.

Parameters

mixed $ua

(string) A user-agent string

Returns

boolean