PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 11.1
Jetpack – WP Security, Backup, Speed, & Growth v11.1
16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 All 501 releases
jetpack / class.jetpack-user-agent.php
class.jetpack-user-agent.php
668 lines 31.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Deprecated. Use Automattic\Jetpack\Device_Detection\User_Agent_Info instead.
4 *
5 * @package automattic/jetpack
6 *
7 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
8 *
9 * Note: we cannot get rid of the class and its methods yet as multiple plugins
10 * still use it. See https://github.com/Automattic/jetpack/pull/16434/files#r667190852
11 *
12 * @phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
13 * @phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
14 * @phpcs:disable WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase
15 * @phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
16 * @phpcs:disable WordPress.Files.FileName
17 */
18
19 use \Automattic\Jetpack\Device_Detection\User_Agent_Info;
20
21 /**
22 * A class providing device properties detection.
23 *
24 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
25 */
26 class Jetpack_User_Agent_Info {
27
28 /**
29 * User_Agent_Info instance from the `jetpack-device-detection` package.
30 *
31 * @var User_Agent_Info
32 */
33 private $ua_info;
34
35 /**
36 * The constructor.
37 *
38 * @param string $ua (Optional) User agent.
39 *
40 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
41 */
42 public function __construct( $ua = '' ) {
43 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info from the `automattic/jetpack-device-detection` package' );
44 $this->ua_info = new User_Agent_Info( $ua );
45 }
46
47 /**
48 * This method detects the mobile User Agent name.
49 *
50 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
51 *
52 * @return string The matched User Agent name, false otherwise.
53 */
54 public function get_mobile_user_agent_name() {
55 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info->get_mobile_user_agent_name from the `automattic/jetpack-device-detection` package' );
56 return $this->ua_info->get_mobile_user_agent_name();
57 }
58
59 /**
60 * This method detects the mobile device's platform. All return strings are from the class constants.
61 * Note that this function returns the platform name, not the UA name/type. You should use a different function
62 * if you need to test the UA capabilites.
63 *
64 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
65 *
66 * @return string Name of the platform, false otherwise.
67 */
68 public function get_platform() {
69 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info->get_platform from the `automattic/jetpack-device-detection` package' );
70 return $this->ua_info->get_platform();
71 }
72
73 /**
74 * This method detects for UA which can display iPhone-optimized web content.
75 * Includes iPhone, iPod Touch, Android, WebOS, Fennec (Firefox mobile), etc.
76 *
77 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
78 */
79 public function isTierIphone() {
80 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info->isTierIphone from the `automattic/jetpack-device-detection` package' );
81 return $this->ua_info->isTierIphone();
82 }
83
84 /**
85 * This method detects for UA which are likely to be capable
86 * but may not necessarily support JavaScript.
87 * Excludes all iPhone Tier UA.
88 *
89 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
90 */
91 public function isTierRichCss() {
92 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info->isTierRichCss from the `automattic/jetpack-device-detection` package' );
93 return $this->ua_info->isTierRichCss();
94 }
95
96 /**
97 * Detects if the user is using a tablet.
98 * props Corey Gilmore, BGR.com
99 *
100 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
101 *
102 * @return bool
103 */
104 public static function is_tablet() {
105 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info->is_tablet from the `automattic/jetpack-device-detection` package' );
106 return ( new User_Agent_Info() )->is_tablet();
107 }
108
109 /**
110 * Detects if the current UA is the default iPhone or iPod Touch Browser.
111 *
112 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
113 */
114 public static function is_iphoneOrIpod() {
115 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info->is_iphone_or_ipod from the `automattic/jetpack-device-detection` package' );
116 return ( new User_Agent_Info() )->is_iphoneOrIpod();
117 }
118
119 /**
120 * Detects if the current UA is iPhone Mobile Safari or another iPhone or iPod Touch Browser.
121 *
122 * They type can check for any iPhone, an iPhone using Safari, or an iPhone using something other than Safari.
123 *
124 * Note: If you want to check for Opera mini, Opera mobile or Firefox mobile (or any 3rd party iPhone browser),
125 * you should put the check condition before the check for 'iphone-any' or 'iphone-not-safari'.
126 * Otherwise those browsers will be 'catched' by the iphone string.
127 *
128 * @param string $type Type of iPhone detection.
129 *
130 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
131 */
132 public static function is_iphone_or_ipod( $type = 'iphone-any' ) {
133 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_iphone_or_ipod from the `automattic/jetpack-device-detection` package' );
134 return User_Agent_Info::is_iphone_or_ipod( $type );
135 }
136
137 /**
138 * Detects if the current UA is Chrome for iOS
139 *
140 * The User-Agent string in Chrome for iOS is the same as the Mobile Safari User-Agent, with CriOS/<ChromeRevision> instead of Version/<VersionNum>.
141 * - Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1_1 like Mac OS X; en) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3
142 *
143 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
144 */
145 public static function is_chrome_for_iOS() {
146 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_chrome_for_iOS from the `automattic/jetpack-device-detection` package' );
147 return User_Agent_Info::is_chrome_for_iOS();
148 }
149
150 /**
151 * Detects if the current UA is Twitter for iPhone
152 *
153 * Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_5 like Mac OS X; nb-no) AppleWebKit/533.17.9 (KHTML, like Gecko) Mobile/8L1 Twitter for iPhone
154 * Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B206 Twitter for iPhone
155 *
156 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
157 */
158 public static function is_twitter_for_iphone() {
159 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_twitter_for_iphone from the `automattic/jetpack-device-detection` package' );
160 return User_Agent_Info::is_twitter_for_iphone();
161 }
162
163 /**
164 * Detects if the current UA is Twitter for iPad
165 *
166 * Old version 4.X - Mozilla/5.0 (iPad; U; CPU OS 4_3_5 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Mobile/8L1 Twitter for iPad
167 * Ver 5.0 or Higher - Mozilla/5.0 (iPad; CPU OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B206 Twitter for iPhone
168 *
169 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
170 */
171 public static function is_twitter_for_ipad() {
172 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_twitter_for_ipad from the `automattic/jetpack-device-detection` package' );
173 return User_Agent_Info::is_twitter_for_ipad();
174 }
175
176 /**
177 * Detects if the current UA is Facebook for iPhone
178 * - Facebook 4020.0 (iPhone; iPhone OS 5.0.1; fr_FR)
179 * - Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_0 like Mac OS X; en_US) AppleWebKit (KHTML, like Gecko) Mobile [FBAN/FBForIPhone;FBAV/4.0.2;FBBV/4020.0;FBDV/iPhone3,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/5.0;FBSS/2; FBCR/O2;FBID/phone;FBLC/en_US;FBSF/2.0]
180 * - Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B206 [FBAN/FBIOS;FBAV/5.0;FBBV/47423;FBDV/iPhone3,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/5.1.1;FBSS/2; FBCR/3ITA;FBID/phone;FBLC/en_US]
181 *
182 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
183 */
184 public static function is_facebook_for_iphone() {
185 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_facebook_for_iphone from the `automattic/jetpack-device-detection` package' );
186 return User_Agent_Info::is_facebook_for_iphone();
187 }
188
189 /**
190 * Detects if the current UA is Facebook for iPad
191 * - Facebook 4020.0 (iPad; iPhone OS 5.0.1; en_US)
192 * - Mozilla/5.0 (iPad; U; CPU iPhone OS 5_0 like Mac OS X; en_US) AppleWebKit (KHTML, like Gecko) Mobile [FBAN/FBForIPhone;FBAV/4.0.2;FBBV/4020.0;FBDV/iPad2,1;FBMD/iPad;FBSN/iPhone OS;FBSV/5.0;FBSS/1; FBCR/;FBID/tablet;FBLC/en_US;FBSF/1.0]
193 * - Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Mobile/10A403 [FBAN/FBIOS;FBAV/5.0;FBBV/47423;FBDV/iPad2,1;FBMD/iPad;FBSN/iPhone OS;FBSV/6.0;FBSS/1; FBCR/;FBID/tablet;FBLC/en_US]
194 *
195 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
196 */
197 public static function is_facebook_for_ipad() {
198 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_facebook_for_ipad from the `automattic/jetpack-device-detection` package' );
199 return User_Agent_Info::is_facebook_for_ipad();
200 }
201
202 /**
203 * Detects if the current UA is WordPress for iOS.
204 *
205 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
206 */
207 public static function is_wordpress_for_ios() {
208 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_wordpress_for_ios from the `automattic/jetpack-device-detection` package' );
209 return User_Agent_Info::is_wordpress_for_ios();
210 }
211
212 /**
213 * Detects if the current device is an iPad.
214 * They type can check for any iPad, an iPad using Safari, or an iPad using something other than Safari.
215 *
216 * Note: If you want to check for Opera mini, Opera mobile or Firefox mobile (or any 3rd party iPad browser),
217 * you should put the check condition before the check for 'iphone-any' or 'iphone-not-safari'.
218 * Otherwise those browsers will be 'catched' by the ipad string.
219 *
220 * @param string $type iPad type.
221 *
222 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
223 */
224 public static function is_ipad( $type = 'ipad-any' ) {
225 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_ipad from the `automattic/jetpack-device-detection` package' );
226 return User_Agent_Info::is_ipad( $type );
227 }
228
229 /**
230 * Detects if the current browser is Firefox Mobile (Fennec)
231 *
232 * See http://www.useragentstring.com/pages/Fennec/
233 * Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.1.1) Gecko/20110415 Firefox/4.0.2pre Fennec/4.0.1
234 * Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1
235 *
236 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
237 */
238 public static function is_firefox_mobile() {
239 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_firefox_mobile from the `automattic/jetpack-device-detection` package' );
240 return User_Agent_Info::is_firefox_mobile();
241 }
242
243 /**
244 * Detects if the current browser is Firefox for desktop
245 *
246 * See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox
247 * Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion
248 * The platform section will include 'Mobile' for phones and 'Tablet' for tablets.
249 *
250 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
251 */
252 public static function is_firefox_desktop() {
253 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_firefox_desktop from the `automattic/jetpack-device-detection` package' );
254 return User_Agent_Info::is_firefox_desktop();
255 }
256
257 /**
258 * Detects if the current browser is FirefoxOS Native browser
259 *
260 * Mozilla/5.0 (Mobile; rv:14.0) Gecko/14.0 Firefox/14.0
261 *
262 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
263 */
264 public static function is_firefox_os() {
265 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_firefox_os from the `automattic/jetpack-device-detection` package' );
266 return User_Agent_Info::is_firefox_os();
267 }
268
269 /**
270 * Detects if the current browser is Opera Mobile
271 *
272 * What is the difference between Opera Mobile and Opera Mini?
273 * - Opera Mobile is a full Internet browser for mobile devices.
274 * - Opera Mini always uses a transcoder to convert the page for a small display.
275 * (it uses Opera advanced server compression technology to compress web content before it gets to a device.
276 * The rendering engine is on Opera's server.)
277 *
278 * Opera/9.80 (Windows NT 6.1; Opera Mobi/14316; U; en) Presto/2.7.81 Version/11.00"
279 * Opera/9.50 (Nintendo DSi; Opera/507; U; en-US)
280 *
281 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
282 */
283 public static function is_opera_mobile() {
284 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_opera_mobile from the `automattic/jetpack-device-detection` package' );
285 return User_Agent_Info::is_opera_mobile();
286 }
287
288 /**
289 * Detects if the current browser is Opera Mini
290 *
291 * Opera/8.01 (J2ME/MIDP; Opera Mini/3.0.6306/1528; en; U; ssr)
292 * Opera/9.80 (Android;Opera Mini/6.0.24212/24.746 U;en) Presto/2.5.25 Version/10.5454
293 * Opera/9.80 (iPhone; Opera Mini/5.0.019802/18.738; U; en) Presto/2.4.15
294 * Opera/9.80 (J2ME/iPhone;Opera Mini/5.0.019802/886; U; ja) Presto/2.4.15
295 * Opera/9.80 (J2ME/iPhone;Opera Mini/5.0.019802/886; U; ja) Presto/2.4.15
296 * Opera/9.80 (Series 60; Opera Mini/5.1.22783/23.334; U; en) Presto/2.5.25 Version/10.54
297 * Opera/9.80 (BlackBerry; Opera Mini/5.1.22303/22.387; U; en) Presto/2.5.25 Version/10.54
298 *
299 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
300 */
301 public static function is_opera_mini() {
302 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_opera_mini from the `automattic/jetpack-device-detection` package' );
303 return User_Agent_Info::is_opera_mini();
304 }
305
306 /**
307 * Detects if the current browser is Opera Mini, but not on a smart device OS(Android, iOS, etc)
308 * Used to send users on dumb devices to m.wor
309 *
310 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
311 */
312 public static function is_opera_mini_dumb() {
313 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_opera_mini_dumb from the `automattic/jetpack-device-detection` package' );
314 return User_Agent_Info::is_opera_mini_dumb();
315 }
316
317 /**
318 * Detects if the current browser is Opera Mobile or Mini.
319 *
320 * Opera Mini 5 Beta: Opera/9.80 (J2ME/MIDP; Opera Mini/5.0.15650/756; U; en) Presto/2.2.0
321 * Opera Mini 8: Opera/8.01 (J2ME/MIDP; Opera Mini/3.0.6306/1528; en; U; ssr)
322 *
323 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
324 */
325 public static function is_OperaMobile() {
326 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_opera_mini() or \Automattic\Jetpack\Device_Detection\User_Agent_Info::is_opera_mobile() from the `automattic/jetpack-device-detection` package' );
327 return User_Agent_Info::is_OperaMobile();
328 }
329
330 /**
331 * Detects if the current browser is a Windows Phone 7 device.
332 * ex: Mozilla/4.0 (compatible; MSIE 7.0; Windows Phone OS 7.0; Trident/3.1; IEMobile/7.0; LG; GW910)
333 *
334 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
335 */
336 public static function is_WindowsPhone7() {
337 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_WindowsPhone7 from the `automattic/jetpack-device-detection` package' );
338 return User_Agent_Info::is_WindowsPhone7();
339 }
340
341 /**
342 * Detects if the current browser is a Windows Phone 8 device.
343 * ex: Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; ARM; Touch; IEMobile/10.0; <Manufacturer>; <Device> [;<Operator>])
344 *
345 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
346 */
347 public static function is_windows_phone_8() {
348 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_windows_phone_8 from the `automattic/jetpack-device-detection` package' );
349 return User_Agent_Info::is_windows_phone_8();
350 }
351
352 /**
353 * Detects if the current browser is on a Palm device running the new WebOS. This EXCLUDES TouchPad.
354 *
355 * Ex1: Mozilla/5.0 (webOS/1.4.0; U; en-US) AppleWebKit/532.2 (KHTML, like Gecko) Version/1.0 Safari/532.2 Pre/1.1
356 * Ex2: Mozilla/5.0 (webOS/1.4.0; U; en-US) AppleWebKit/532.2 (KHTML, like Gecko) Version/1.0 Safari/532.2 Pixi/1.1
357 *
358 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
359 */
360 public static function is_PalmWebOS() {
361 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_PalmWebOS from the `automattic/jetpack-device-detection` package' );
362 return User_Agent_Info::is_PalmWebOS();
363 }
364
365 /**
366 * Detects if the current browser is the HP TouchPad default browser. This excludes phones wt WebOS.
367 *
368 * TouchPad Emulator: Mozilla/5.0 (hp-desktop; Linux; hpwOS/2.0; U; it-IT) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/233.70 Safari/534.6 Desktop/1.0
369 * TouchPad: Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.0; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/233.70 Safari/534.6 TouchPad/1.0
370 *
371 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
372 */
373 public static function is_TouchPad() {
374 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_TouchPad from the `automattic/jetpack-device-detection` package' );
375 return User_Agent_Info::is_TouchPad();
376 }
377
378 /**
379 * Detects if the current browser is the Series 60 Open Source Browser.
380 *
381 * OSS Browser 3.2 on E75: Mozilla/5.0 (SymbianOS/9.3; U; Series60/3.2 NokiaE75-1/110.48.125 Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413
382 *
383 * 7.0 Browser (Nokia 5800 XpressMusic (v21.0.025)) : Mozilla/5.0 (SymbianOS/9.4; U; Series60/5.0 Nokia5800d-1/21.0.025; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413
384 *
385 * Browser 7.1 (Nokia N97 (v12.0.024)) : Mozilla/5.0 (SymbianOS/9.4; Series60/5.0 NokiaN97-1/12.0.024; Profile/MIDP-2.1 Configuration/CLDC-1.1; en-us) AppleWebKit/525 (KHTML, like Gecko) BrowserNG/7.1.12344
386 *
387 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
388 */
389 public static function is_S60_OSSBrowser() {
390 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_S60_OSSBrowser from the `automattic/jetpack-device-detection` package' );
391 return User_Agent_Info::is_S60_OSSBrowser();
392 }
393
394 /**
395 * Detects if the device platform is the Symbian Series 60.
396 *
397 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
398 */
399 public static function is_symbian_platform() {
400 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_symbian_platform from the `automattic/jetpack-device-detection` package' );
401 return User_Agent_Info::is_symbian_platform();
402 }
403
404 /**
405 * Detects if the device platform is the Symbian Series 40.
406 * Nokia Browser for Series 40 is a proxy based browser, previously known as Ovi Browser.
407 * This browser will report 'NokiaBrowser' in the header, however some older version will also report 'OviBrowser'.
408 *
409 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
410 */
411 public static function is_symbian_s40_platform() {
412 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_symbian_s40_platform from the `automattic/jetpack-device-detection` package' );
413 return User_Agent_Info::is_symbian_s40_platform();
414 }
415
416 /**
417 * Returns if the device belongs to J2ME capable family.
418 *
419 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
420 *
421 * @return bool
422 */
423 public static function is_J2ME_platform() {
424 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_J2ME_platform from the `automattic/jetpack-device-detection` package' );
425 return User_Agent_Info::is_J2ME_platform();
426 }
427
428 /**
429 * Detects if the current UA is on one of the Maemo-based Nokia Internet Tablets.
430 *
431 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
432 */
433 public static function is_MaemoTablet() {
434 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_MaemoTablet from the `automattic/jetpack-device-detection` package' );
435 return User_Agent_Info::is_MaemoTablet();
436 }
437
438 /**
439 * Detects if the current UA is a MeeGo device (Nokia Smartphone).
440 *
441 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
442 */
443 public static function is_MeeGo() {
444 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_MeeGo from the `automattic/jetpack-device-detection` package' );
445 return User_Agent_Info::is_MeeGo();
446 }
447
448 /**
449 * The is_webkit() method can be used to check the User Agent for an webkit generic browser.
450 *
451 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
452 */
453 public static function is_webkit() {
454 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_webkit from the `automattic/jetpack-device-detection` package' );
455 return User_Agent_Info::is_webkit();
456 }
457
458 /**
459 * Detects if the current browser is the Native Android browser.
460 *
461 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
462 *
463 * @return boolean true if the browser is Android otherwise false
464 */
465 public static function is_android() {
466 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_android from the `automattic/jetpack-device-detection` package' );
467 return User_Agent_Info::is_android();
468 }
469
470 /**
471 * Detects if the current browser is the Native Android Tablet browser.
472 * Assumes 'Android' should be in the user agent, but not 'mobile'
473 *
474 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
475 *
476 * @return boolean true if the browser is Android and not 'mobile' otherwise false
477 */
478 public static function is_android_tablet() {
479 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_android_tablet from the `automattic/jetpack-device-detection` package' );
480 return User_Agent_Info::is_android_tablet();
481 }
482
483 /**
484 * Detects if the current browser is the Kindle Fire Native browser.
485 *
486 * 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
487 * 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
488 *
489 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
490 *
491 * @return boolean true if the browser is Kindle Fire Native browser otherwise false
492 */
493 public static function is_kindle_fire() {
494 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_kindle_fire from the `automattic/jetpack-device-detection` package' );
495 return User_Agent_Info::is_kindle_fire();
496 }
497
498 /**
499 * Detects if the current browser is the Kindle Touch Native browser
500 *
501 * 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+
502 *
503 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
504 *
505 * @return boolean true if the browser is Kindle monochrome Native browser otherwise false
506 */
507 public static function is_kindle_touch() {
508 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_kindle_touch from the `automattic/jetpack-device-detection` package' );
509 return User_Agent_Info::is_kindle_touch();
510 }
511
512 /**
513 * Detect if user agent is the WordPress.com Windows 8 app (used ONLY on the custom oauth stylesheet)
514 *
515 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
516 */
517 public static function is_windows8_auth() {
518 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_windows8_auth from the `automattic/jetpack-device-detection` package' );
519 return User_Agent_Info::is_windows8_auth();
520 }
521
522 /**
523 * Detect if user agent is the WordPress.com Windows 8 app.
524 *
525 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
526 */
527 public static function is_wordpress_for_win8() {
528 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_wordpress_for_win8 from the `automattic/jetpack-device-detection` package' );
529 return User_Agent_Info::is_wordpress_for_win8();
530 }
531
532 /**
533 * Detect if user agent is the WordPress.com Desktop app.
534 *
535 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
536 */
537 public static function is_wordpress_desktop_app() {
538 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_wordpress_desktop_app from the `automattic/jetpack-device-detection` package' );
539 return User_Agent_Info::is_wordpress_desktop_app();
540 }
541
542 /**
543 * The is_blackberry_tablet() method can be used to check the User Agent for a RIM blackberry tablet.
544 * The user agent of the BlackBerry® Tablet OS follows a format similar to the following:
545 * Mozilla/5.0 (PlayBook; U; RIM Tablet OS 1.0.0; en-US) AppleWebKit/534.8+ (KHTML, like Gecko) Version/0.0.1 Safari/534.8+
546 *
547 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
548 */
549 public static function is_blackberry_tablet() {
550 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_blackberry_tablet from the `automattic/jetpack-device-detection` package' );
551 return User_Agent_Info::is_blackberry_tablet();
552 }
553
554 /**
555 * The is_blackbeberry() method can be used to check the User Agent for a blackberry device.
556 * Note that opera mini on BB matches this rule.
557 *
558 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
559 */
560 public static function is_blackbeberry() {
561 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_blackbeberry from the `automattic/jetpack-device-detection` package' );
562 return User_Agent_Info::is_blackbeberry();
563 }
564
565 /**
566 * The is_blackberry_10() method can be used to check the User Agent for a BlackBerry 10 device.
567 *
568 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
569 */
570 public static function is_blackberry_10() {
571 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_blackberry_10 from the `automattic/jetpack-device-detection` package' );
572 return User_Agent_Info::is_blackberry_10();
573 }
574
575 /**
576 * Retrieve the blackberry OS version.
577 *
578 * Return strings are from the following list:
579 * - blackberry-10
580 * - blackberry-7
581 * - blackberry-6
582 * - blackberry-torch //only the first edition. The 2nd edition has the OS7 onboard and doesn't need any special rule.
583 * - blackberry-5
584 * - blackberry-4.7
585 * - blackberry-4.6
586 * - blackberry-4.5
587 *
588 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
589 *
590 * @return string Version of the BB OS. If version is not found, get_blackbeberry_OS_version will return boolean false.
591 */
592 public static function get_blackbeberry_OS_version() {
593 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::get_blackbeberry_OS_version from the `automattic/jetpack-device-detection` package' );
594 return User_Agent_Info::get_blackbeberry_OS_version();
595 }
596
597 /**
598 * Retrieve the blackberry browser version.
599 *
600 * Return string are from the following list:
601 * - blackberry-10
602 * - blackberry-webkit
603 * - blackberry-5
604 * - blackberry-4.7
605 * - blackberry-4.6
606 *
607 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
608 *
609 * @return string Type of the BB browser. If browser's version is not found, detect_blackbeberry_browser_version will return boolean false.
610 */
611 public static function detect_blackberry_browser_version() {
612 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::detect_blackberry_browser_version from the `automattic/jetpack-device-detection` package' );
613 return User_Agent_Info::detect_blackberry_browser_version();
614 }
615
616 /**
617 * Checks if a visitor is coming from one of the WordPress mobile apps.
618 *
619 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
620 *
621 * @return bool
622 */
623 public static function is_mobile_app() {
624 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_mobile_app from the `automattic/jetpack-device-detection` package' );
625 return User_Agent_Info::is_mobile_app();
626 }
627
628 /**
629 * Detects if the current browser is Nintendo 3DS handheld.
630 *
631 * Example: Mozilla/5.0 (Nintendo 3DS; U; ; en) Version/1.7498.US
632 * can differ in language, version and region
633 *
634 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
635 */
636 public static function is_Nintendo_3DS() {
637 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_Nintendo_3DS from the `automattic/jetpack-device-detection` package' );
638 return User_Agent_Info::is_Nintendo_3DS();
639 }
640
641 /**
642 * Was the current request made by a known bot?
643 *
644 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
645 *
646 * @return boolean
647 */
648 public static function is_bot() {
649 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_bot from the `automattic/jetpack-device-detection` package' );
650 return User_Agent_Info::is_bot();
651 }
652
653 /**
654 * Is the given user-agent a known bot?
655 * 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.
656 *
657 * @param string $ua A user-agent string.
658 *
659 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
660 *
661 * @return boolean
662 */
663 public static function is_bot_user_agent( $ua = null ) {
664 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_bot_user_agent from the `automattic/jetpack-device-detection` package' );
665 return User_Agent_Info::is_bot_user_agent( $ua );
666 }
667 }
668