Automattic\Jetpack\Device_Detection

User_Agent_Info::is_WindowsPhone7()public staticWPSCache 1.0

Detects if the current browser is a Windows Phone 7 device. ex: Mozilla/4.0 (compatible; MSIE 7.0; Windows Phone OS 7.0; Trident/3.1; IEMobile/7.0; LG; GW910)

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

Хуков нет.

Возвращает

null. Ничего.

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

$result = User_Agent_Info::is_WindowsPhone7();

Код User_Agent_Info::is_WindowsPhone7() WPSCache 1.9.1

public static function is_WindowsPhone7() {
	if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
		return false;
	}

	$ua = strtolower( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- This is validating.

	if ( false === strpos( $ua, 'windows phone os 7' ) ) {
		return false;
	} else {
		if ( self::is_opera_mini() || self::is_opera_mobile() || self::is_firefox_mobile() ) {
			return false;
		} else {
			return true;
		}
	}
}