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)
Method of the class: User_Agent_Info{}
No Hooks.
Return
null
. Nothing (null).
Usage
$result = User_Agent_Info::is_WindowsPhone7();
User_Agent_Info::is_WindowsPhone7() User Agent Info::is WindowsPhone7 code WPSCache 1.12.4
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; } }