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.9 11.9.1 11.9.2 11.9.3 12.0 12.0.1 12.0.2 12.1 12.1.1 12.1.2 12.2 12.2.1 12.2.2 12.3 12.3.1 12.4 12.4.1 12.5 12.5.1 12.6 12.6.1 12.6.2 12.6.3 12.7 12.7.1 12.7.2 12.8 12.8.1 12.8.2 12.9 12.9.1 12.9.2 12.9.3 12.9.4 13.0 13.0.1 13.1 13.1.1 13.1.2 13.1.3 13.1.4 13.2 13.2.1 13.2.2 13.2.3 13.3 13.3.1 13.3.2 13.4 13.4.1 13.4.2 13.4.3 13.4.4 13.5 13.5.1 13.6 13.6.1 13.7 13.7.1 13.8 13.8.1 13.8.2 13.9 13.9.1 14.0 14.1 14.2 14.2.1 14.3 14.4 14.4.1 14.5 14.6 14.7 14.8 14.9 14.9.1 15.0 15.0.1 15.0.2 15.1 15.1.1 15.2 15.3 15.3.1 15.4 15.5 15.6 15.7 15.7-a.1 15.7-a.3 15.7-a.5 15.7-a.7 15.7-beta
jetpack / class.jetpack-user-agent.php
jetpack Last commit date
3rd-party 5 years ago _inc 5 years ago bin 5 years ago css 5 years ago extensions 5 years ago images 5 years ago json-endpoints 5 years ago modules 5 years ago sal 5 years ago src 6 years ago vendor 5 years ago views 6 years ago .svnignore 12 years ago CODE-OF-CONDUCT.md 9 years ago changelog.txt 5 years ago class-jetpack-wizard-banner.php 6 years ago class.frame-nonce-preview.php 6 years ago class.jetpack-admin.php 5 years ago class.jetpack-affiliate.php 6 years ago class.jetpack-autoupdate.php 5 years ago class.jetpack-bbpress-json-api.compat.php 6 years ago class.jetpack-cli.php 5 years ago class.jetpack-client-server.php 6 years ago class.jetpack-connection-banner.php 5 years ago class.jetpack-data.php 6 years ago class.jetpack-debugger.php 7 years ago class.jetpack-error.php 5 years ago class.jetpack-gutenberg.php 5 years ago class.jetpack-heartbeat.php 5 years ago class.jetpack-idc.php 6 years ago class.jetpack-ixr-client.php 6 years ago class.jetpack-modules-list-table.php 6 years ago class.jetpack-network-sites-list-table.php 6 years ago class.jetpack-network.php 5 years ago class.jetpack-plan.php 5 years ago class.jetpack-post-images.php 6 years ago class.jetpack-twitter-cards.php 5 years ago class.jetpack-user-agent.php 5 years ago class.jetpack-xmlrpc-server.php 6 years ago class.jetpack.php 5 years ago class.json-api-endpoints.php 6 years ago class.json-api.php 6 years ago class.photon.php 5 years ago composer.json 5 years ago functions.compat.php 6 years ago functions.cookies.php 6 years ago functions.gallery.php 6 years ago functions.global.php 5 years ago functions.opengraph.php 5 years ago functions.photon.php 5 years ago jest.config.js 5 years ago jetpack.php 5 years ago json-api-config.php 10 years ago json-endpoints.php 7 years ago load-jetpack.php 6 years ago locales.php 7 years ago readme.txt 5 years ago require-lib.php 6 years ago uninstall.php 6 years ago wpml-config.xml 10 years ago
class.jetpack-user-agent.php
673 lines
1 <?php
2 /**
3 * Deprecated. Use Automattic\Jetpack\Device_Detection\User_Agent_Info instead.
4 *
5 * @package Jetpack
6 *
7 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
8 *
9 * @phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
10 * @phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
11 * @phpcs:disable WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase
12 * @phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
13 * @phpcs:disable WordPress.Files.FileName
14 */
15
16 use \Automattic\Jetpack\Device_Detection\User_Agent_Info;
17
18 /**
19 * A class providing device properties detection.
20 *
21 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
22 */
23 class Jetpack_User_Agent_Info {
24
25 /**
26 * User_Agent_Info instance from the `jetpack-device-detection` package.
27 *
28 * @var User_Agent_Info
29 */
30 private $ua_info;
31
32 /**
33 * The constructor.
34 *
35 * @param string $ua (Optional) User agent.
36 *
37 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
38 */
39 public function __construct( $ua = '' ) {
40 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info from the `automattic/jetpack-device-detection` package' );
41 $this->ua_info = new User_Agent_Info( $ua );
42 }
43
44 /**
45 * This method detects the mobile User Agent name.
46 *
47 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
48 *
49 * @return string The matched User Agent name, false otherwise.
50 */
51 public function get_mobile_user_agent_name() {
52 _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' );
53 return $this->ua_info->get_mobile_user_agent_name();
54 }
55
56 /**
57 * This method detects the mobile device's platform. All return strings are from the class constants.
58 * Note that this function returns the platform name, not the UA name/type. You should use a different function
59 * if you need to test the UA capabilites.
60 *
61 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
62 *
63 * @return string Name of the platform, false otherwise.
64 */
65 public function get_platform() {
66 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info->get_platform from the `automattic/jetpack-device-detection` package' );
67 return $this->ua_info->get_platform();
68 }
69
70 /**
71 * This method detects for UA which can display iPhone-optimized web content.
72 * Includes iPhone, iPod Touch, Android, WebOS, Fennec (Firefox mobile), etc.
73 *
74 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
75 */
76 public function isTierIphone() {
77 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info->isTierIphone from the `automattic/jetpack-device-detection` package' );
78 return $this->ua_info->isTierIphone();
79 }
80
81 /**
82 * This method detects for UA which are likely to be capable
83 * but may not necessarily support JavaScript.
84 * Excludes all iPhone Tier UA.
85 *
86 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
87 */
88 public function isTierRichCss() {
89 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info->isTierRichCss from the `automattic/jetpack-device-detection` package' );
90 return $this->ua_info->isTierRichCss();
91 }
92
93 /**
94 * Detects if the user is using a tablet.
95 * props Corey Gilmore, BGR.com
96 *
97 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
98 *
99 * @return bool
100 */
101 public static function is_tablet() {
102 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info->is_tablet from the `automattic/jetpack-device-detection` package' );
103 return ( new User_Agent_Info() )->is_tablet();
104 }
105
106 /**
107 * Detects if the current UA is the default iPhone or iPod Touch Browser.
108 *
109 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
110 */
111 public static function is_iphoneOrIpod() {
112 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info->is_iphone_or_ipod from the `automattic/jetpack-device-detection` package' );
113 return ( new User_Agent_Info() )->is_iphoneOrIpod();
114 }
115
116
117 /**
118 * Detects if the current UA is iPhone Mobile Safari or another iPhone or iPod Touch Browser.
119 *
120 * They type can check for any iPhone, an iPhone using Safari, or an iPhone using something other than Safari.
121 *
122 * Note: If you want to check for Opera mini, Opera mobile or Firefox mobile (or any 3rd party iPhone browser),
123 * you should put the check condition before the check for 'iphone-any' or 'iphone-not-safari'.
124 * Otherwise those browsers will be 'catched' by the iphone string.
125 *
126 * @param string $type Type of iPhone detection.
127 *
128 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
129 */
130 public static function is_iphone_or_ipod( $type = 'iphone-any' ) {
131 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_iphone_or_ipod from the `automattic/jetpack-device-detection` package' );
132 return User_Agent_Info::is_iphone_or_ipod( $type );
133 }
134
135 /**
136 * Detects if the current UA is Chrome for iOS
137 *
138 * The User-Agent string in Chrome for iOS is the same as the Mobile Safari User-Agent, with CriOS/<ChromeRevision> instead of Version/<VersionNum>.
139 * - 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
140 *
141 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
142 */
143 public static function is_chrome_for_iOS() {
144 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_chrome_for_iOS from the `automattic/jetpack-device-detection` package' );
145 return User_Agent_Info::is_chrome_for_iOS();
146 }
147
148 /**
149 * Detects if the current UA is Twitter for iPhone
150 *
151 * 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
152 * 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
153 *
154 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
155 */
156 public static function is_twitter_for_iphone() {
157 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_twitter_for_iphone from the `automattic/jetpack-device-detection` package' );
158 return User_Agent_Info::is_twitter_for_iphone();
159 }
160
161 /**
162 * Detects if the current UA is Twitter for iPad
163 *
164 * 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
165 * 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
166 *
167 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
168 */
169 public static function is_twitter_for_ipad() {
170 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_twitter_for_ipad from the `automattic/jetpack-device-detection` package' );
171 return User_Agent_Info::is_twitter_for_ipad();
172 }
173
174 /**
175 * Detects if the current UA is Facebook for iPhone
176 * - Facebook 4020.0 (iPhone; iPhone OS 5.0.1; fr_FR)
177 * - 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]
178 * - 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]
179 *
180 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
181 */
182 public static function is_facebook_for_iphone() {
183 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_facebook_for_iphone from the `automattic/jetpack-device-detection` package' );
184 return User_Agent_Info::is_facebook_for_iphone();
185 }
186
187 /**
188 * Detects if the current UA is Facebook for iPad
189 * - Facebook 4020.0 (iPad; iPhone OS 5.0.1; en_US)
190 * - 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]
191 * - 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]
192 *
193 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
194 */
195 public static function is_facebook_for_ipad() {
196 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_facebook_for_ipad from the `automattic/jetpack-device-detection` package' );
197 return User_Agent_Info::is_facebook_for_ipad();
198 }
199
200 /**
201 * Detects if the current UA is WordPress for iOS.
202 *
203 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
204 */
205 public static function is_wordpress_for_ios() {
206 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_wordpress_for_ios from the `automattic/jetpack-device-detection` package' );
207 return User_Agent_Info::is_wordpress_for_ios();
208 }
209
210 /**
211 * Detects if the current device is an iPad.
212 * They type can check for any iPad, an iPad using Safari, or an iPad using something other than Safari.
213 *
214 * Note: If you want to check for Opera mini, Opera mobile or Firefox mobile (or any 3rd party iPad browser),
215 * you should put the check condition before the check for 'iphone-any' or 'iphone-not-safari'.
216 * Otherwise those browsers will be 'catched' by the ipad string.
217 *
218 * @param string $type iPad type.
219 *
220 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
221 */
222 public static function is_ipad( $type = 'ipad-any' ) {
223 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_ipad from the `automattic/jetpack-device-detection` package' );
224 return User_Agent_Info::is_ipad( $type );
225 }
226
227 /**
228 * Detects if the current browser is Firefox Mobile (Fennec)
229 *
230 * See http://www.useragentstring.com/pages/Fennec/
231 * Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.1.1) Gecko/20110415 Firefox/4.0.2pre Fennec/4.0.1
232 * Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1
233 *
234 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
235 */
236 public static function is_firefox_mobile() {
237 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_firefox_mobile from the `automattic/jetpack-device-detection` package' );
238 return User_Agent_Info::is_firefox_mobile();
239 }
240
241 /**
242 * Detects if the current browser is Firefox for desktop
243 *
244 * See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox
245 * Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion
246 * The platform section will include 'Mobile' for phones and 'Tablet' for tablets.
247 *
248 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
249 */
250 public static function is_firefox_desktop() {
251 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_firefox_desktop from the `automattic/jetpack-device-detection` package' );
252 return User_Agent_Info::is_firefox_desktop();
253 }
254
255 /**
256 * Detects if the current browser is FirefoxOS Native browser
257 *
258 * Mozilla/5.0 (Mobile; rv:14.0) Gecko/14.0 Firefox/14.0
259 *
260 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
261 */
262 public static function is_firefox_os() {
263 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_firefox_os from the `automattic/jetpack-device-detection` package' );
264 return User_Agent_Info::is_firefox_os();
265 }
266
267 /**
268 * Detects if the current browser is Opera Mobile
269 *
270 * What is the difference between Opera Mobile and Opera Mini?
271 * - Opera Mobile is a full Internet browser for mobile devices.
272 * - Opera Mini always uses a transcoder to convert the page for a small display.
273 * (it uses Opera advanced server compression technology to compress web content before it gets to a device.
274 * The rendering engine is on Opera's server.)
275 *
276 * Opera/9.80 (Windows NT 6.1; Opera Mobi/14316; U; en) Presto/2.7.81 Version/11.00"
277 * Opera/9.50 (Nintendo DSi; Opera/507; U; en-US)
278 *
279 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
280 */
281 public static function is_opera_mobile() {
282 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_opera_mobile from the `automattic/jetpack-device-detection` package' );
283 return User_Agent_Info::is_opera_mobile();
284 }
285
286
287 /**
288 * Detects if the current browser is Opera Mini
289 *
290 * Opera/8.01 (J2ME/MIDP; Opera Mini/3.0.6306/1528; en; U; ssr)
291 * Opera/9.80 (Android;Opera Mini/6.0.24212/24.746 U;en) Presto/2.5.25 Version/10.5454
292 * Opera/9.80 (iPhone; Opera Mini/5.0.019802/18.738; U; en) Presto/2.4.15
293 * Opera/9.80 (J2ME/iPhone;Opera Mini/5.0.019802/886; U; ja) 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 (Series 60; Opera Mini/5.1.22783/23.334; U; en) Presto/2.5.25 Version/10.54
296 * Opera/9.80 (BlackBerry; Opera Mini/5.1.22303/22.387; U; en) Presto/2.5.25 Version/10.54
297 *
298 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
299 */
300 public static function is_opera_mini() {
301 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_opera_mini from the `automattic/jetpack-device-detection` package' );
302 return User_Agent_Info::is_opera_mini();
303 }
304
305 /**
306 * Detects if the current browser is Opera Mini, but not on a smart device OS(Android, iOS, etc)
307 * Used to send users on dumb devices to m.wor
308 *
309 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
310 */
311 public static function is_opera_mini_dumb() {
312 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_opera_mini_dumb from the `automattic/jetpack-device-detection` package' );
313 return User_Agent_Info::is_opera_mini_dumb();
314 }
315
316 /**
317 * Detects if the current browser is Opera Mobile or Mini.
318 *
319 * Opera Mini 5 Beta: Opera/9.80 (J2ME/MIDP; Opera Mini/5.0.15650/756; U; en) Presto/2.2.0
320 * Opera Mini 8: Opera/8.01 (J2ME/MIDP; Opera Mini/3.0.6306/1528; en; U; ssr)
321 *
322 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
323 */
324 public static function is_OperaMobile() {
325 _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' );
326 return User_Agent_Info::is_OperaMobile();
327 }
328
329 /**
330 * Detects if the current browser is a Windows Phone 7 device.
331 * ex: Mozilla/4.0 (compatible; MSIE 7.0; Windows Phone OS 7.0; Trident/3.1; IEMobile/7.0; LG; GW910)
332 *
333 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
334 */
335 public static function is_WindowsPhone7() {
336 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_WindowsPhone7 from the `automattic/jetpack-device-detection` package' );
337 return User_Agent_Info::is_WindowsPhone7();
338 }
339
340 /**
341 * Detects if the current browser is a Windows Phone 8 device.
342 * ex: Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; ARM; Touch; IEMobile/10.0; <Manufacturer>; <Device> [;<Operator>])
343 *
344 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
345 */
346 public static function is_windows_phone_8() {
347 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_windows_phone_8 from the `automattic/jetpack-device-detection` package' );
348 return User_Agent_Info::is_windows_phone_8();
349 }
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 /**
380 * Detects if the current browser is the Series 60 Open Source Browser.
381 *
382 * 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
383 *
384 * 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
385 *
386 * 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
387 *
388 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
389 */
390 public static function is_S60_OSSBrowser() {
391 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_S60_OSSBrowser from the `automattic/jetpack-device-detection` package' );
392 return User_Agent_Info::is_S60_OSSBrowser();
393 }
394
395 /**
396 * Detects if the device platform is the Symbian Series 60.
397 *
398 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
399 */
400 public static function is_symbian_platform() {
401 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_symbian_platform from the `automattic/jetpack-device-detection` package' );
402 return User_Agent_Info::is_symbian_platform();
403 }
404
405 /**
406 * Detects if the device platform is the Symbian Series 40.
407 * Nokia Browser for Series 40 is a proxy based browser, previously known as Ovi Browser.
408 * This browser will report 'NokiaBrowser' in the header, however some older version will also report 'OviBrowser'.
409 *
410 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
411 */
412 public static function is_symbian_s40_platform() {
413 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_symbian_s40_platform from the `automattic/jetpack-device-detection` package' );
414 return User_Agent_Info::is_symbian_s40_platform();
415 }
416
417 /**
418 * Returns if the device belongs to J2ME capable family.
419 *
420 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
421 *
422 * @return bool
423 */
424 public static function is_J2ME_platform() {
425 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_J2ME_platform from the `automattic/jetpack-device-detection` package' );
426 return User_Agent_Info::is_J2ME_platform();
427 }
428
429
430 /**
431 * Detects if the current UA is on one of the Maemo-based Nokia Internet Tablets.
432 *
433 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
434 */
435 public static function is_MaemoTablet() {
436 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_MaemoTablet from the `automattic/jetpack-device-detection` package' );
437 return User_Agent_Info::is_MaemoTablet();
438 }
439
440 /**
441 * Detects if the current UA is a MeeGo device (Nokia Smartphone).
442 *
443 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
444 */
445 public static function is_MeeGo() {
446 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_MeeGo from the `automattic/jetpack-device-detection` package' );
447 return User_Agent_Info::is_MeeGo();
448 }
449
450
451 /**
452 * The is_webkit() method can be used to check the User Agent for an webkit generic browser.
453 *
454 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
455 */
456 public static function is_webkit() {
457 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_webkit from the `automattic/jetpack-device-detection` package' );
458 return User_Agent_Info::is_webkit();
459 }
460
461 /**
462 * Detects if the current browser is the Native Android browser.
463 *
464 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
465 *
466 * @return boolean true if the browser is Android otherwise false
467 */
468 public static function is_android() {
469 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_android from the `automattic/jetpack-device-detection` package' );
470 return User_Agent_Info::is_android();
471 }
472
473
474 /**
475 * Detects if the current browser is the Native Android Tablet browser.
476 * Assumes 'Android' should be in the user agent, but not 'mobile'
477 *
478 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
479 *
480 * @return boolean true if the browser is Android and not 'mobile' otherwise false
481 */
482 public static function is_android_tablet() {
483 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_android_tablet from the `automattic/jetpack-device-detection` package' );
484 return User_Agent_Info::is_android_tablet();
485 }
486
487 /**
488 * Detects if the current browser is the Kindle Fire Native browser.
489 *
490 * 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
491 * 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
492 *
493 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
494 *
495 * @return boolean true if the browser is Kindle Fire Native browser otherwise false
496 */
497 public static function is_kindle_fire() {
498 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_kindle_fire from the `automattic/jetpack-device-detection` package' );
499 return User_Agent_Info::is_kindle_fire();
500 }
501
502 /**
503 * Detects if the current browser is the Kindle Touch Native browser
504 *
505 * 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+
506 *
507 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
508 *
509 * @return boolean true if the browser is Kindle monochrome Native browser otherwise false
510 */
511 public static function is_kindle_touch() {
512 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_kindle_touch from the `automattic/jetpack-device-detection` package' );
513 return User_Agent_Info::is_kindle_touch();
514 }
515
516
517 /**
518 * Detect if user agent is the WordPress.com Windows 8 app (used ONLY on the custom oauth stylesheet)
519 *
520 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
521 */
522 public static function is_windows8_auth() {
523 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_windows8_auth from the `automattic/jetpack-device-detection` package' );
524 return User_Agent_Info::is_windows8_auth();
525 }
526
527 /**
528 * Detect if user agent is the WordPress.com Windows 8 app.
529 *
530 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
531 */
532 public static function is_wordpress_for_win8() {
533 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_wordpress_for_win8 from the `automattic/jetpack-device-detection` package' );
534 return User_Agent_Info::is_wordpress_for_win8();
535 }
536
537 /**
538 * Detect if user agent is the WordPress.com Desktop app.
539 *
540 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
541 */
542 public static function is_wordpress_desktop_app() {
543 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_wordpress_desktop_app from the `automattic/jetpack-device-detection` package' );
544 return User_Agent_Info::is_wordpress_desktop_app();
545 }
546
547 /**
548 * The is_blackberry_tablet() method can be used to check the User Agent for a RIM blackberry tablet.
549 * The user agent of the BlackBerry® Tablet OS follows a format similar to the following:
550 * 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+
551 *
552 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
553 */
554 public static function is_blackberry_tablet() {
555 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_blackberry_tablet from the `automattic/jetpack-device-detection` package' );
556 return User_Agent_Info::is_blackberry_tablet();
557 }
558
559 /**
560 * The is_blackbeberry() method can be used to check the User Agent for a blackberry device.
561 * Note that opera mini on BB matches this rule.
562 *
563 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
564 */
565 public static function is_blackbeberry() {
566 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_blackbeberry from the `automattic/jetpack-device-detection` package' );
567 return User_Agent_Info::is_blackbeberry();
568 }
569
570 /**
571 * The is_blackberry_10() method can be used to check the User Agent for a BlackBerry 10 device.
572 *
573 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
574 */
575 public static function is_blackberry_10() {
576 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_blackberry_10 from the `automattic/jetpack-device-detection` package' );
577 return User_Agent_Info::is_blackberry_10();
578 }
579
580 /**
581 * Retrieve the blackberry OS version.
582 *
583 * Return strings are from the following list:
584 * - blackberry-10
585 * - blackberry-7
586 * - blackberry-6
587 * - blackberry-torch //only the first edition. The 2nd edition has the OS7 onboard and doesn't need any special rule.
588 * - blackberry-5
589 * - blackberry-4.7
590 * - blackberry-4.6
591 * - blackberry-4.5
592 *
593 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
594 *
595 * @return string Version of the BB OS. If version is not found, get_blackbeberry_OS_version will return boolean false.
596 */
597 public static function get_blackbeberry_OS_version() {
598 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::get_blackbeberry_OS_version from the `automattic/jetpack-device-detection` package' );
599 return User_Agent_Info::get_blackbeberry_OS_version();
600 }
601
602 /**
603 * Retrieve the blackberry browser version.
604 *
605 * Return string are from the following list:
606 * - blackberry-10
607 * - blackberry-webkit
608 * - blackberry-5
609 * - blackberry-4.7
610 * - blackberry-4.6
611 *
612 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
613 *
614 * @return string Type of the BB browser. If browser's version is not found, detect_blackbeberry_browser_version will return boolean false.
615 */
616 public static function detect_blackberry_browser_version() {
617 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::detect_blackberry_browser_version from the `automattic/jetpack-device-detection` package' );
618 return User_Agent_Info::detect_blackberry_browser_version();
619 }
620
621 /**
622 * Checks if a visitor is coming from one of the WordPress mobile apps.
623 *
624 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
625 *
626 * @return bool
627 */
628 public static function is_mobile_app() {
629 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_mobile_app from the `automattic/jetpack-device-detection` package' );
630 return User_Agent_Info::is_mobile_app();
631 }
632
633 /**
634 * Detects if the current browser is Nintendo 3DS handheld.
635 *
636 * Example: Mozilla/5.0 (Nintendo 3DS; U; ; en) Version/1.7498.US
637 * can differ in language, version and region
638 *
639 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
640 */
641 public static function is_Nintendo_3DS() {
642 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_Nintendo_3DS from the `automattic/jetpack-device-detection` package' );
643 return User_Agent_Info::is_Nintendo_3DS();
644 }
645
646 /**
647 * Was the current request made by a known bot?
648 *
649 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
650 *
651 * @return boolean
652 */
653 public static function is_bot() {
654 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_bot from the `automattic/jetpack-device-detection` package' );
655 return User_Agent_Info::is_bot();
656 }
657
658 /**
659 * Is the given user-agent a known bot?
660 * 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.
661 *
662 * @param string $ua A user-agent string.
663 *
664 * @deprecated 8.7.0 Use Automattic\Jetpack\Device_Detection\User_Agent_Info
665 *
666 * @return boolean
667 */
668 public static function is_bot_user_agent( $ua = null ) {
669 _deprecated_function( __METHOD__, 'Jetpack 8.7', '\Automattic\Jetpack\Device_Detection\User_Agent_Info::is_bot_user_agent from the `automattic/jetpack-device-detection` package' );
670 return User_Agent_Info::is_bot_user_agent( $ua );
671 }
672 }
673