@@ 755-768 (lines=14) @@ | ||
752 | * The platform section will include 'Mobile' for phones and 'Tablet' for tablets. |
|
753 | * |
|
754 | */ |
|
755 | static function is_firefox_desktop() { |
|
756 | ||
757 | if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { |
|
758 | return false; |
|
759 | } |
|
760 | ||
761 | $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
|
762 | ||
763 | if ( false !== strpos( $ua, 'firefox' ) && false === strpos( $ua, 'mobile' ) && false === strpos( $ua, 'tablet' ) ) { |
|
764 | return true; |
|
765 | } else { |
|
766 | return false; |
|
767 | } |
|
768 | } |
|
769 | ||
770 | /* |
|
771 | * Detects if the current browser is FirefoxOS Native browser |
|
@@ 1085-1100 (lines=16) @@ | ||
1082 | return false; |
|
1083 | } |
|
1084 | ||
1085 | static function is_J2ME_platform() { |
|
1086 | ||
1087 | if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { |
|
1088 | return false; |
|
1089 | } |
|
1090 | ||
1091 | $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
|
1092 | ||
1093 | if ( strpos( $agent, 'j2me/midp' ) !== false ) { |
|
1094 | return true; |
|
1095 | } elseif ( strpos( $agent, 'midp' ) !== false && strpos( $agent, 'cldc' ) ) { |
|
1096 | return true; |
|
1097 | } |
|
1098 | ||
1099 | return false; |
|
1100 | } |
|
1101 | ||
1102 | ||
1103 | /* |