@@ 760-771 (lines=12) @@ | ||
757 | * Mozilla/5.0 (Mobile; rv:14.0) Gecko/14.0 Firefox/14.0 |
|
758 | * |
|
759 | */ |
|
760 | static function is_firefox_os() { |
|
761 | ||
762 | if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { |
|
763 | return false; |
|
764 | } |
|
765 | ||
766 | $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
|
767 | ||
768 | if ( strpos( $ua, 'mozilla' ) !== false && strpos( $ua, 'mobile' ) !== false && strpos( $ua, 'gecko' ) !== false && strpos( $ua, 'firefox' ) !== false ) { |
|
769 | return true; |
|
770 | } else { |
|
771 | return false; |
|
772 | } |
|
773 | } |
|
774 | ||
@@ 788-801 (lines=14) @@ | ||
785 | * Opera/9.80 (Windows NT 6.1; Opera Mobi/14316; U; en) Presto/2.7.81 Version/11.00" |
|
786 | * Opera/9.50 (Nintendo DSi; Opera/507; U; en-US) |
|
787 | */ |
|
788 | static function is_opera_mobile() { |
|
789 | ||
790 | if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { |
|
791 | return false; |
|
792 | } |
|
793 | ||
794 | $ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
|
795 | ||
796 | if ( strpos( $ua, 'opera' ) !== false && strpos( $ua, 'mobi' ) !== false ) { |
|
797 | return true; |
|
798 | } elseif ( strpos( $ua, 'opera' ) !== false && strpos( $ua, 'nintendo dsi' ) !== false ) { |
|
799 | return true; |
|
800 | } else { |
|
801 | return false; |
|
802 | } |
|
803 | } |
|
804 |