@@ 783-794 (lines=12) @@ | ||
780 | * Mozilla/5.0 (Mobile; rv:14.0) Gecko/14.0 Firefox/14.0 |
|
781 | * |
|
782 | */ |
|
783 | static function is_firefox_os() { |
|
784 | ||
785 | if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { |
|
786 | return false; |
|
787 | } |
|
788 | ||
789 | $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
|
790 | ||
791 | if ( strpos( $ua, 'mozilla' ) !== false && strpos( $ua, 'mobile' ) !== false && strpos( $ua, 'gecko' ) !== false && strpos( $ua, 'firefox' ) !== false ) { |
|
792 | return true; |
|
793 | } else { |
|
794 | return false; |
|
795 | } |
|
796 | } |
|
797 | ||
@@ 811-824 (lines=14) @@ | ||
808 | * Opera/9.80 (Windows NT 6.1; Opera Mobi/14316; U; en) Presto/2.7.81 Version/11.00" |
|
809 | * Opera/9.50 (Nintendo DSi; Opera/507; U; en-US) |
|
810 | */ |
|
811 | static function is_opera_mobile() { |
|
812 | ||
813 | if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { |
|
814 | return false; |
|
815 | } |
|
816 | ||
817 | $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
|
818 | ||
819 | if ( strpos( $ua, 'opera' ) !== false && strpos( $ua, 'mobi' ) !== false ) { |
|
820 | return true; |
|
821 | } elseif ( strpos( $ua, 'opera' ) !== false && strpos( $ua, 'nintendo dsi' ) !== false ) { |
|
822 | return true; |
|
823 | } else { |
|
824 | return false; |
|
825 | } |
|
826 | } |
|
827 |