Automattic\Jetpack\Device_Detection
User_Agent_Info::is_WindowsPhone7()
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
. Ничего (null).
Использование
$result = User_Agent_Info::is_WindowsPhone7();
Код User_Agent_Info::is_WindowsPhone7() User Agent Info::is WindowsPhone7 WPSCache 1.10.0
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; } elseif ( self::is_opera_mini() || self::is_opera_mobile() || self::is_firefox_mobile() ) { return false; } else { return true; } }