@@ 776-787 (lines=12) @@ | ||
773 | * Mozilla/5.0 (Mobile; rv:14.0) Gecko/14.0 Firefox/14.0 |
|
774 | * |
|
775 | */ |
|
776 | static function is_firefox_os() { |
|
777 | ||
778 | if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { |
|
779 | return false; |
|
780 | } |
|
781 | ||
782 | $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
|
783 | ||
784 | if ( strpos( $ua, 'mozilla' ) !== false && strpos( $ua, 'mobile' ) !== false && strpos( $ua, 'gecko' ) !== false && strpos( $ua, 'firefox' ) !== false ) { |
|
785 | return true; |
|
786 | } else { |
|
787 | return false; |
|
788 | } |
|
789 | } |
|
790 | ||
@@ 804-817 (lines=14) @@ | ||
801 | * Opera/9.80 (Windows NT 6.1; Opera Mobi/14316; U; en) Presto/2.7.81 Version/11.00" |
|
802 | * Opera/9.50 (Nintendo DSi; Opera/507; U; en-US) |
|
803 | */ |
|
804 | static function is_opera_mobile() { |
|
805 | ||
806 | if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { |
|
807 | return false; |
|
808 | } |
|
809 | ||
810 | $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
|
811 | ||
812 | if ( strpos( $ua, 'opera' ) !== false && strpos( $ua, 'mobi' ) !== false ) { |
|
813 | return true; |
|
814 | } elseif ( strpos( $ua, 'opera' ) !== false && strpos( $ua, 'nintendo dsi' ) !== false ) { |
|
815 | return true; |
|
816 | } else { |
|
817 | return false; |
|
818 | } |
|
819 | } |
|
820 |