|
@@ 674-687 (lines=14) @@
|
| 671 |
|
* Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion |
| 672 |
|
* The platform section will include 'Mobile' for phones and 'Tablet' for tablets. |
| 673 |
|
*/ |
| 674 |
|
public static function is_firefox_desktop() { |
| 675 |
|
|
| 676 |
|
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { |
| 677 |
|
return false; |
| 678 |
|
} |
| 679 |
|
|
| 680 |
|
$ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
| 681 |
|
|
| 682 |
|
if ( false !== strpos( $ua, 'firefox' ) && false === strpos( $ua, 'mobile' ) && false === strpos( $ua, 'tablet' ) ) { |
| 683 |
|
return true; |
| 684 |
|
} else { |
| 685 |
|
return false; |
| 686 |
|
} |
| 687 |
|
} |
| 688 |
|
|
| 689 |
|
/** |
| 690 |
|
* Detects if the current browser is FirefoxOS Native browser |
|
@@ 1012-1026 (lines=15) @@
|
| 1009 |
|
* |
| 1010 |
|
* @return bool |
| 1011 |
|
*/ |
| 1012 |
|
public static function is_J2ME_platform() { |
| 1013 |
|
|
| 1014 |
|
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { |
| 1015 |
|
return false; |
| 1016 |
|
} |
| 1017 |
|
|
| 1018 |
|
$agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
| 1019 |
|
|
| 1020 |
|
if ( strpos( $agent, 'j2me/midp' ) !== false ) { |
| 1021 |
|
return true; |
| 1022 |
|
} elseif ( strpos( $agent, 'midp' ) !== false && strpos( $agent, 'cldc' ) ) { |
| 1023 |
|
return true; |
| 1024 |
|
} |
| 1025 |
|
return false; |
| 1026 |
|
} |
| 1027 |
|
|
| 1028 |
|
/** |
| 1029 |
|
* Detects if the current UA is on one of the Maemo-based Nokia Internet Tablets. |