Automattic\Jetpack\Device_Detection
User_Agent_Info::is_PalmWebOS()
Detects if the current browser is on a Palm device running the new WebOS. This EXCLUDES TouchPad.
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 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
Method of the class: User_Agent_Info{}
No Hooks.
Return
null
. Nothing (null).
Usage
$result = User_Agent_Info::is_PalmWebOS();
User_Agent_Info::is_PalmWebOS() User Agent Info::is PalmWebOS code WPSCache 1.12.4
public static function is_PalmWebOS() { 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, 'webos' ) ) { return false; } elseif ( self::is_opera_mini() || self::is_opera_mobile() || self::is_firefox_mobile() ) { return false; } else { return true; } }