@@ 678-691 (lines=14) @@ | ||
675 | * Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion |
|
676 | * The platform section will include 'Mobile' for phones and 'Tablet' for tablets. |
|
677 | */ |
|
678 | public static function is_firefox_desktop() { |
|
679 | ||
680 | if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { |
|
681 | return false; |
|
682 | } |
|
683 | ||
684 | $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
|
685 | ||
686 | if ( false !== strpos( $ua, 'firefox' ) && false === strpos( $ua, 'mobile' ) && false === strpos( $ua, 'tablet' ) ) { |
|
687 | return true; |
|
688 | } else { |
|
689 | return false; |
|
690 | } |
|
691 | } |
|
692 | ||
693 | /** |
|
694 | * Detects if the current browser is FirefoxOS Native browser |
|
@@ 1000-1014 (lines=15) @@ | ||
997 | * |
|
998 | * @return bool |
|
999 | */ |
|
1000 | public static function is_J2ME_platform() { |
|
1001 | ||
1002 | if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { |
|
1003 | return false; |
|
1004 | } |
|
1005 | ||
1006 | $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
|
1007 | ||
1008 | if ( strpos( $agent, 'j2me/midp' ) !== false ) { |
|
1009 | return true; |
|
1010 | } elseif ( strpos( $agent, 'midp' ) !== false && strpos( $agent, 'cldc' ) ) { |
|
1011 | return true; |
|
1012 | } |
|
1013 | return false; |
|
1014 | } |
|
1015 | ||
1016 | ||
1017 | /** |