Automattic\Jetpack\Device_Detection

User_Agent_Info::isTierIphone()publicWPSCache 1.0

This method detects for UA which can display iPhone-optimized web content. Includes iPhone, iPod Touch, Android, WebOS, Fennec (Firefox mobile), etc.

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

No Hooks.

Return

null. Nothing.

Usage

$User_Agent_Info = new User_Agent_Info();
$User_Agent_Info->isTierIphone();

Code of User_Agent_Info::isTierIphone() WPSCache 1.9.1

public function isTierIphone() {
	if ( isset( $this->isTierIphone ) ) {
		return $this->isTierIphone;
	}
	if ( $this->is_iphoneOrIpod() ) {
		$this->matched_agent       = 'iphone';
		$this->isTierIphone        = true;
		$this->isTierRichCss       = false;
		$this->isTierGenericMobile = false;
	} elseif ( $this->is_android() ) {
		$this->matched_agent       = 'android';
		$this->isTierIphone        = true;
		$this->isTierRichCss       = false;
		$this->isTierGenericMobile = false;
	} elseif ( $this->is_windows_phone_8() ) {
		$this->matched_agent       = 'winphone8';
		$this->isTierIphone        = true;
		$this->isTierRichCss       = false;
		$this->isTierGenericMobile = false;
	} elseif ( $this->is_WindowsPhone7() ) {
		$this->matched_agent       = 'win7';
		$this->isTierIphone        = true;
		$this->isTierRichCss       = false;
		$this->isTierGenericMobile = false;
	} elseif ( $this->is_blackberry_10() ) {
		$this->matched_agent       = 'blackberry-10';
		$this->isTierIphone        = true;
		$this->isTierRichCss       = false;
		$this->isTierGenericMobile = false;
	} elseif ( $this->is_blackbeberry() && 'blackberry-webkit' === $this->detect_blackberry_browser_version() ) {
		$this->matched_agent       = 'blackberry-webkit';
		$this->isTierIphone        = true;
		$this->isTierRichCss       = false;
		$this->isTierGenericMobile = false;
	} elseif ( $this->is_blackberry_tablet() ) {
		$this->matched_agent       = 'blackberry_tablet';
		$this->isTierIphone        = true;
		$this->isTierRichCss       = false;
		$this->isTierGenericMobile = false;
	} elseif ( $this->is_PalmWebOS() ) {
		$this->matched_agent       = 'webos';
		$this->isTierIphone        = true;
		$this->isTierRichCss       = false;
		$this->isTierGenericMobile = false;
	} elseif ( $this->is_TouchPad() ) {
		$this->matched_agent       = 'hp_tablet';
		$this->isTierIphone        = true;
		$this->isTierRichCss       = false;
		$this->isTierGenericMobile = false;
	} elseif ( $this->is_firefox_os() ) {
		$this->matched_agent       = 'firefoxOS';
		$this->isTierIphone        = true;
		$this->isTierRichCss       = false;
		$this->isTierGenericMobile = false;
	} elseif ( $this->is_firefox_mobile() ) {
		$this->matched_agent       = 'fennec';
		$this->isTierIphone        = true;
		$this->isTierRichCss       = false;
		$this->isTierGenericMobile = false;
	} elseif ( $this->is_opera_mobile() ) {
		$this->matched_agent       = 'opera-mobi';
		$this->isTierIphone        = true;
		$this->isTierRichCss       = false;
		$this->isTierGenericMobile = false;
	} elseif ( $this->is_MaemoTablet() ) {
		$this->matched_agent       = 'maemo';
		$this->isTierIphone        = true;
		$this->isTierRichCss       = false;
		$this->isTierGenericMobile = false;
	} elseif ( $this->is_MeeGo() ) {
		$this->matched_agent       = 'meego';
		$this->isTierIphone        = true;
		$this->isTierRichCss       = false;
		$this->isTierGenericMobile = false;
	} elseif ( $this->is_kindle_touch() ) {
		$this->matched_agent       = 'kindle-touch';
		$this->isTierIphone        = true;
		$this->isTierRichCss       = false;
		$this->isTierGenericMobile = false;
	} elseif ( $this->is_Nintendo_3DS() ) {
		$this->matched_agent       = 'nintendo-3ds';
		$this->isTierIphone        = true;
		$this->isTierRichCss       = false;
		$this->isTierGenericMobile = false;
	} else {
		$this->isTierIphone = false;
	}
	return $this->isTierIphone;
}