|
@@ 727-738 (lines=12) @@
|
| 724 |
|
* Mozilla/5.0 (Mobile; rv:14.0) Gecko/14.0 Firefox/14.0 |
| 725 |
|
* |
| 726 |
|
*/ |
| 727 |
|
static function is_firefox_os( ) { |
| 728 |
|
|
| 729 |
|
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) |
| 730 |
|
return false; |
| 731 |
|
|
| 732 |
|
$ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
| 733 |
|
|
| 734 |
|
if ( strpos( $ua, 'mozilla' ) !== false && strpos( $ua, 'mobile' ) !== false && strpos( $ua, 'gecko' ) !== false && strpos( $ua, 'firefox' ) !== false) |
| 735 |
|
return true; |
| 736 |
|
else |
| 737 |
|
return false; |
| 738 |
|
} |
| 739 |
|
|
| 740 |
|
|
| 741 |
|
/* |
|
@@ 753-766 (lines=14) @@
|
| 750 |
|
* Opera/9.80 (Windows NT 6.1; Opera Mobi/14316; U; en) Presto/2.7.81 Version/11.00" |
| 751 |
|
* Opera/9.50 (Nintendo DSi; Opera/507; U; en-US) |
| 752 |
|
*/ |
| 753 |
|
static function is_opera_mobile( ) { |
| 754 |
|
|
| 755 |
|
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) |
| 756 |
|
return false; |
| 757 |
|
|
| 758 |
|
$ua = strtolower( $_SERVER['HTTP_USER_AGENT'] ); |
| 759 |
|
|
| 760 |
|
if ( strpos( $ua, 'opera' ) !== false && strpos( $ua, 'mobi' ) !== false ) |
| 761 |
|
return true; |
| 762 |
|
elseif ( strpos( $ua, 'opera' ) !== false && strpos( $ua, 'nintendo dsi' ) !== false ) |
| 763 |
|
return true; |
| 764 |
|
else |
| 765 |
|
return false; |
| 766 |
|
} |
| 767 |
|
|
| 768 |
|
|
| 769 |
|
/* |