Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/wp-content/plugins/mobile-client-detection-plugin/mobile_client_detection.php b/wp-content/plugins/mobile-client-detection-plugin/mobile_client_detection.php
- index 1a207c8..d1e5d22 100644
- --- a/wp-content/plugins/mobile-client-detection-plugin/mobile_client_detection.php
- +++ b/wp-content/plugins/mobile-client-detection-plugin/mobile_client_detection.php
- @@ -81,7 +81,7 @@ function mcd_get_platform($general_output=false){
- }
- $ua = trim(strtolower($_SERVER['HTTP_USER_AGENT']));
- - $pattern = '/(android\s\d|blackberry|ip(hone|ad|od)|iemobile|webos|palm|symbian|kindle|windows|win64|wow64|macintosh|intel\smac\sos\sx|ppx\smac\sos\sx|googlebot|googlebot-
- + $pattern = '/(android\s\d|android; tablet|android; mobile|blackberry|ip(hone|ad|od)|iemobile|webos|palm|symbian|kindle|windows|win64|wow64|macintosh|intel\smac\sos\sx|ppx\
- if(preg_match($pattern,$ua,$matches)){$platform=$matches[0];}
- switch($platform){
- @@ -89,6 +89,7 @@ function mcd_get_platform($general_output=false){
- /* phones */
- case 'android 1':
- case 'android 2':
- + case 'android; mobile':
- case 'blackberry':
- case 'iphone':
- case 'ipod':
- @@ -102,6 +103,7 @@ function mcd_get_platform($general_output=false){
- /* tablets */
- case 'android 3':
- + case 'android; tablet':
- case 'ipad':
- case 'kindle':
- if($general_output){$platform='tablet';}
- @@ -137,11 +139,13 @@ function mcd_get_platform($general_output=false){
- case 'android 1':
- case 'android 2':
- + case 'android; mobile':
- if(!$general_output){$platform='android-phone';}
- break;
- /* mobile platforms */
- case 'android 3':
- + case 'android; tablet':
- if(!$general_output){$platform='android-tablet';}
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement