Automattic\Jetpack\Device_Detection
User_Agent_Info::is_firefox_os()
Detects if the current browser is FirefoxOS Native browser
Mozilla/5.0 (Mobile; rv:14.0) Gecko/14.0 Firefox/14.0
Method of the class: User_Agent_Info{}
No Hooks.
Return
null
. Nothing (null).
Usage
$result = User_Agent_Info::is_firefox_os();
User_Agent_Info::is_firefox_os() User Agent Info::is firefox os code WPSCache 1.12.4
public static function is_firefox_os() { 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 ( strpos( $ua, 'mozilla' ) !== false && strpos( $ua, 'mobile' ) !== false && strpos( $ua, 'gecko' ) !== false && strpos( $ua, 'firefox' ) !== false ) { return true; } else { return false; } }