Changeset 2220600
- Timestamp:
- 01/01/2020 08:27:22 PM (6 years ago)
- Location:
- unreal-themes-switching/trunk
- Files:
-
- 6 edited
-
functions.php (modified) (3 diffs)
-
lib/mobile-detect.php (modified) (95 diffs)
-
readme.txt (modified) (2 diffs)
-
settings.php (modified) (6 diffs)
-
uninstall.php (modified) (1 diff)
-
unreal-themes-switching.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
unreal-themes-switching/trunk/functions.php
r1872377 r2220600 4 4 * Change theme 5 5 */ 6 add_filter('template', 'u nreal_change_theme');7 add_filter('option_template', 'u nreal_change_theme');8 add_filter('option_stylesheet', 'u nreal_change_theme');6 add_filter('template', 'ut_change_theme'); 7 add_filter('option_template', 'ut_change_theme'); 8 add_filter('option_stylesheet', 'ut_change_theme'); 9 9 10 function u nreal_change_theme($template) {10 function ut_change_theme($template) { 11 11 12 12 /* class mobile detect */ … … 14 14 15 15 $detect = new Mobile_Detect; 16 $options = get_option('u nreal_option');16 $options = get_option('ut_option'); 17 17 $deviceType = ($detect->isMobile() ? ($detect->isTablet() ? 'tablet' : 'phone') : 'computer'); 18 18 19 $template_tablet = (in_array($options['tablet'], u nreal_get_array_themes())) ? $options['tablet'] : $template;20 $template_phone = (in_array($options['phone'], u nreal_get_array_themes())) ? $options['phone'] : $template;19 $template_tablet = (in_array($options['tablet'], ut_get_array_themes())) ? $options['tablet'] : $template; 20 $template_phone = (in_array($options['phone'], ut_get_array_themes())) ? $options['phone'] : $template; 21 21 22 22 switch($deviceType): … … 39 39 } 40 40 41 function u nreal_get_array_themes(){41 function ut_get_array_themes(){ 42 42 43 43 $result = array(); -
unreal-themes-switching/trunk/lib/mobile-detect.php
r1872377 r2220600 2 2 /** 3 3 * Mobile Detect Library 4 * =====================5 *6 4 * Motto: "Every business should have a mobile detection script to detect mobile readers" 7 5 * … … 9 7 * It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment. 10 8 * 11 * @author Current authors: Serban Ghita <[email protected]> 12 * Nick Ilyin <[email protected]> 9 * Homepage: http://mobiledetect.net 10 * GitHub: https://github.com/serbanghita/Mobile-Detect 11 * README: https://github.com/serbanghita/Mobile-Detect/blob/master/README.md 12 * CONTRIBUTING: https://github.com/serbanghita/Mobile-Detect/blob/master/docs/CONTRIBUTING.md 13 * KNOWN LIMITATIONS: https://github.com/serbanghita/Mobile-Detect/blob/master/docs/KNOWN_LIMITATIONS.md 14 * EXAMPLES: https://github.com/serbanghita/Mobile-Detect/wiki/Code-examples 13 15 * 14 * Original author: Victor Stanciu <[email protected]> 16 * @license https://github.com/serbanghita/Mobile-Detect/blob/master/LICENSE.txt MIT License 17 * @author Serban Ghita <[email protected]> 18 * @author Nick Ilyin <[email protected]> 19 * Original author: Victor Stanciu <[email protected]> 15 20 * 16 * @license Code and contributions have 'MIT License' 17 * More details: https://github.com/serbanghita/Mobile-Detect/blob/master/LICENSE.txt 18 * 19 * @link Homepage: http://mobiledetect.net 20 * GitHub Repo: https://github.com/serbanghita/Mobile-Detect 21 * Google Code: http://code.google.com/p/php-mobile-detect/ 22 * README: https://github.com/serbanghita/Mobile-Detect/blob/master/README.md 23 * HOWTO: https://github.com/serbanghita/Mobile-Detect/wiki/Code-examples 24 * 25 * @version 2.8.30 21 * @version 2.8.34 26 22 */ 27 28 23 class Mobile_Detect 29 24 { … … 34 29 */ 35 30 const DETECTION_TYPE_MOBILE = 'mobile'; 36 37 31 /** 38 32 * Extended detection type. … … 41 35 */ 42 36 const DETECTION_TYPE_EXTENDED = 'extended'; 43 44 37 /** 45 38 * A frequently used regular expression to extract version #s. … … 48 41 */ 49 42 const VER = '([\w._\+]+)'; 50 51 43 /** 52 44 * Top-level device. 53 45 */ 54 46 const MOBILE_GRADE_A = 'A'; 55 56 47 /** 57 48 * Mid-level device. 58 49 */ 59 50 const MOBILE_GRADE_B = 'B'; 60 61 51 /** 62 52 * Low-level device. 63 53 */ 64 54 const MOBILE_GRADE_C = 'C'; 65 66 55 /** 67 56 * Stores the version number of the current release. 68 57 */ 69 const VERSION = '2.8.30'; 70 58 const VERSION = '2.8.34'; 71 59 /** 72 60 * A type for the version() method indicating a string return value. 73 61 */ 74 62 const VERSION_TYPE_STRING = 'text'; 75 76 63 /** 77 64 * A type for the version() method indicating a float return value. 78 65 */ 79 66 const VERSION_TYPE_FLOAT = 'float'; 80 81 67 /** 82 68 * A cache for resolved matches … … 84 70 */ 85 71 protected $cache = array(); 86 87 72 /** 88 73 * The User-Agent HTTP header is stored in here. … … 90 75 */ 91 76 protected $userAgent = null; 92 93 77 /** 94 78 * HTTP headers in the PHP-flavor. So HTTP_USER_AGENT and SERVER_SOFTWARE. … … 96 80 */ 97 81 protected $httpHeaders = array(); 98 99 82 /** 100 83 * CloudFront headers. E.g. CloudFront-Is-Desktop-Viewer, CloudFront-Is-Mobile-Viewer & CloudFront-Is-Tablet-Viewer. … … 102 85 */ 103 86 protected $cloudfrontHeaders = array(); 104 105 87 /** 106 88 * The matching Regex. … … 109 91 */ 110 92 protected $matchingRegex = null; 111 112 93 /** 113 94 * The matches extracted from the regex expression. 114 95 * This is good for debug. 96 * 115 97 * @var string 116 98 */ 117 99 protected $matchesArray = null; 118 119 100 /** 120 101 * The detection type, using self::DETECTION_TYPE_MOBILE or self::DETECTION_TYPE_EXTENDED. … … 125 106 */ 126 107 protected $detectionType = self::DETECTION_TYPE_MOBILE; 127 128 108 /** 129 109 * HTTP headers that trigger the 'isMobile' detection … … 133 113 */ 134 114 protected static $mobileHeaders = array( 135 136 115 'HTTP_ACCEPT' => array('matches' => array( 137 116 // Opera Mini; @reference: http://dev.opera.com/articles/view/opera-binary-markup-language/ … … 161 140 'HTTP_UA_CPU' => array('matches' => array('ARM')), 162 141 ); 163 164 142 /** 165 143 * List of mobile devices (phones). … … 169 147 protected static $phoneDevices = array( 170 148 'iPhone' => '\biPhone\b|\biPod\b', // |\biTunes 171 'BlackBerry' => 'BlackBerry|\bBB10\b|rim[0-9]+ ',149 'BlackBerry' => 'BlackBerry|\bBB10\b|rim[0-9]+|\b(BBA100|BBB100|BBD100|BBE100|BBF100|STH100)\b-[0-9]+', 172 150 'HTC' => 'HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\bEVO\b|T-Mobile G1|Z520m|Android [0-9.]+; Pixel', 173 151 'Nexus' => 'Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6', 174 152 // @todo: Is 'Dell Streak' a tablet or a phone? ;) 175 153 'Dell' => 'Dell[;]? (Streak|Aero|Venue|Venue Pro|Flash|Smoke|Mini 3iX)|XCD28|XCD35|\b001DL\b|\b101DL\b|\bGS01\b', 176 'Motorola' => 'Motorola|DROIDX|DROID BIONIC|\bDroid\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\bMoto E\b|XT1068|XT1092 ',177 'Samsung' => '\bSamsung\b|SM-G950F|SM-G955F|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F|SM-G920F|SM-G920V|SM-G930F|SM-N910C|SM-A310F|GT-I9190|SM-J500FN|SM-G903F ',178 'LG' => '\bLG\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323 )',154 'Motorola' => 'Motorola|DROIDX|DROID BIONIC|\bDroid\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\bMoto E\b|XT1068|XT1092|XT1052', 155 'Samsung' => '\bSamsung\b|SM-G950F|SM-G955F|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F|SM-G920F|SM-G920V|SM-G930F|SM-N910C|SM-A310F|GT-I9190|SM-J500FN|SM-G903F|SM-J330F', 156 'LG' => '\bLG\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323|M257)|LM-G710', 179 157 'Sony' => 'SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533', 180 158 'Asus' => 'Asus.*Galaxy|PadFone.*Mobile', … … 201 179 'Wolfgang' => 'AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q', 202 180 'Alcatel' => 'Alcatel', 203 'Nintendo' => 'Nintendo 3DS',181 'Nintendo' => 'Nintendo (3DS|Switch)', 204 182 // http://en.wikipedia.org/wiki/Amoi 205 183 'Amoi' => 'Amoi', 206 184 // http://en.wikipedia.org/wiki/INQ 207 185 'INQ' => 'INQ', 186 'OnePlus' => 'ONEPLUS', 208 187 // @Tapatalk is a mobile app; http://support.tapatalk.com/threads/smf-2-0-2-os-and-browser-detection-plugin-and-tapatalk.15565/#post-79039 209 188 'GenericPhone' => 'Tapatalk|PDA;|SAGEM|\bmmp\b|pocket|\bpsp\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\bwap\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser', 210 189 ); 211 212 190 /** 213 191 * List of tablet devices. … … 220 198 // Removed |^.*Android.*Nexus(?!(?:Mobile).)*$ 221 199 // @see #442 200 // @todo Merge NexusTablet into GoogleTablet. 222 201 'NexusTablet' => 'Android.*Nexus[\s]+(7|9|10)', 223 'SamsungTablet' => 'SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-T116BU|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|SM-T719|SM-T813|SM-T819|SM-T580|SM-T355Y?|SM-T280|SM-T817A|SM-T820|SM-W700|SM-P580|SM-T587|SM-P350|SM-P555M|SM-P355M|SM-T113NU|SM-T815Y', // SCH-P709|SCH-P729|SM-T2558|GT-I9205 - Samsung Mega - treat them like a regular phone. 202 // https://en.wikipedia.org/wiki/Pixel_C 203 'GoogleTablet' => 'Android.*Pixel C', 204 'SamsungTablet' => 'SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-T116BU|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|SM-T719|SM-T813|SM-T819|SM-T580|SM-T355Y?|SM-T280|SM-T817A|SM-T820|SM-W700|SM-P580|SM-T587|SM-P350|SM-P555M|SM-P355M|SM-T113NU|SM-T815Y|SM-T585|SM-T285|SM-T825|SM-W708|SM-T835|SM-T830|SM-T837V|SM-T720|SM-T510|SM-T387V', // SCH-P709|SCH-P729|SM-T2558|GT-I9205 - Samsung Mega - treat them like a regular phone. 224 205 // http://docs.aws.amazon.com/silk/latest/developerguide/user-agent.html 225 206 'Kindle' => 'Kindle|Silk.*Accelerated|Android.*\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI|KFFOWI|KFGIWI|KFMEWI)\b|Android.*Silk/[0-9.]+ like Chrome/[0-9.]+ (?!Mobile)', … … 231 212 // Watch out for PadFone, see #132. 232 213 // http://www.asus.com/de/Tablets_Mobile/Memo_Pad_Products/ 233 'AsusTablet' => '^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\bK00F\b|\bK00C\b|\bK00E\b|\bK00L\b|TX201LA|ME176C|ME102A|\bM80TA\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K011 | K017 | K01E |ME572C|ME103K|ME170C|ME171C|\bME70C\b|ME581C|ME581CL|ME8510C|ME181C|P01Y|PO1MA|P01Z|\bP027\b ',214 'AsusTablet' => '^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\bK00F\b|\bK00C\b|\bK00E\b|\bK00L\b|TX201LA|ME176C|ME102A|\bM80TA\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K011 | K017 | K01E |ME572C|ME103K|ME170C|ME171C|\bME70C\b|ME581C|ME581CL|ME8510C|ME181C|P01Y|PO1MA|P01Z|\bP027\b|\bP024\b|\bP00C\b', 234 215 'BlackBerryTablet' => 'PlayBook|RIM Tablet', 235 216 'HTCtablet' => 'HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410', … … 253 234 'PrestigioTablet' => 'PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002', 254 235 // http://support.lenovo.com/en_GB/downloads/default.page?# 255 'LenovoTablet' => 'Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-850M|YT3-X90L|YT3-X90F|YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)|TB-X103F|TB-X304 F|TB-8703F',236 'LenovoTablet' => 'Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-850M|YT3-X90L|YT3-X90F|YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)|TB-X103F|TB-X304X|TB-X304F|TB-X304L|TB-X505F|TB-X505L|TB-X505X|TB-X605F|TB-X605L|TB-8703F|TB-8703X|TB-8703N|TB-8704N|TB-8704F|TB-8704X|TB-8704V|TB-7304F|TB-7304I|TB-7304X|Tab2A7-10F|Tab2A7-20F|TB2-X30L|YT3-X50L|YT3-X50F|YT3-X50M|YT-X705F|YT-X703F|YT-X703L|YT-X705L|YT-X705X|TB2-X30F|TB2-X30L|TB2-X30M|A2107A-F|A2107A-H|TB3-730F|TB3-730M|TB3-730X|TB-7504F|TB-7504X', 256 237 // http://www.dell.com/support/home/us/en/04/Products/tab_mob/tablets 257 238 'DellTablet' => 'Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7', … … 279 260 // Readers http://www.atsuhiro-me.net/ebook/sony-reader/sony-reader-web-browser 280 261 // http://www.sony.jp/support/tablet/ 281 'SonyTablet' => 'Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP6 12|SOT31',262 'SonyTablet' => 'Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP641|SGP612|SOT31|SGP771|SGP611|SGP612|SGP712', 282 263 // http://www.support.philips.com/support/catalog/worldproducts.jsp?userLanguage=en&userCountry=cn&categoryid=3G_LTE_TABLET_SU_CN_CARE&title=3G%20tablets%20/%20LTE%20range&_dyncharset=UTF-8 283 264 'PhilipsTablet' => '\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\b', … … 303 284 'FlyTablet' => 'IQ310|Fly Vision', 304 285 // http://www.bqreaders.com/gb/tablets-prices-sale.html 305 'bqTablet' => 'Android.*(bq)?.* (Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris ([E|M]10|M8))|Maxwell.*Lite|Maxwell.*Plus',286 'bqTablet' => 'Android.*(bq)?.*\b(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris ([E|M]10|M8))\b|Maxwell.*Lite|Maxwell.*Plus', 306 287 // http://www.huaweidevice.com/worldwide/productFamily.do?method=index&directoryId=5011&treeId=3290 307 288 // http://www.huaweidevice.com/worldwide/downloadCenter.do?method=index&directoryId=3372&treeId=0&tb=1&type=software (including legacy tablets) 308 'HuaweiTablet' => 'MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim|M2-A01L ',289 'HuaweiTablet' => 'MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim|M2-A01L|BAH-L09|BAH-W09|AGS-L09|CMR-AL19', 309 290 // Nec or Medias Tab 310 291 'NecTablet' => '\bN-06D|\bN-08D', … … 316 297 'VersusTablet' => 'TOUCHPAD.*[78910]|\bTOUCHTAB\b', 317 298 // http://www.zync.in/index.php/our-products/tablet-phablets 318 'ZyncTablet' => 'z1000|Z99 2G|z9 9|z930|z999|z990|z909|Z919|z900',299 'ZyncTablet' => 'z1000|Z99 2G|z930|z990|z909|Z919|z900', // Removed "z999" because of https://github.com/serbanghita/Mobile-Detect/issues/717 319 300 // http://www.positivoinformatica.com.br/www/pessoal/tablet-ypy/ 320 301 'PositivoTablet' => 'TB07STA|TB10STA|TB07FTA|TB10FTA', … … 338 319 'DanyTechTablet' => 'Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB GII|Genius TAB GIII|Genius Tab S1', 339 320 // http://www.galapad.net/product.html 340 'GalapadTablet' => 'Android.*\bG1\b ',321 'GalapadTablet' => 'Android.*\bG1\b(?!\))', 341 322 // http://www.micromaxinfo.com/tablet/funbook 342 323 'MicromaxTablet' => 'Funbook|Micromax.*\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\b', … … 379 360 // Modecom Tablets - http://www.modecom.eu/tablets/portal/ 380 361 'ModecomTablet' => 'FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003', 381 // Vonino Tablets - http://www.vonino.eu/tablets362 // Vonino Tablets 382 363 'VoninoTablet' => '\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\bQ8\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\b', 383 364 // ECS Tablets - http://www.ecs.com.tw/ECSWebSite/Product/Product_Tablet_List.aspx?CategoryID=14&MenuID=107&childid=M_107&LanID=0 … … 387 368 'StorexTablet' => 'eZee[_\']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab', 388 369 // Generic Vodafone tablets. 389 'VodafoneTablet' => 'SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497 ',370 'VodafoneTablet' => 'SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497|VFD 1400', 390 371 // French tablets - Essentiel B http://www.boulanger.fr/tablette_tactile_e-book/tablette_tactile_essentiel_b/cl_68908.htm?multiChoiceToDelete=brand&mc_brand=essentielb 391 372 // Aka: http://www.essentielb.fr/ … … 406 387 'SkkTablet' => 'Android.* (SKYPAD|PHOENIX|CYCLOPS)', 407 388 // Tecno Mobile (only tablet) - http://www.tecno-mobile.com/index.php/product?filterby=smart&list_order=all&page=1 408 'TecnoTablet' => 'TECNO P9 ',389 'TecnoTablet' => 'TECNO P9|TECNO DP8D', 409 390 // JXD (consoles & tablets) - http://jxd.hk/products.asp?selectclassid=009008&clsid=3 410 391 'JXDTablet' => 'Android.* \b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\b', … … 429 410 'TeclastTablet' => 'T98 4G|\bP80\b|\bX90HD\b|X98 Air|X98 Air 3G|\bX89\b|P80 3G|\bX80h\b|P98 Air|\bX89HD\b|P98 3G|\bP90HD\b|P89 3G|X98 3G|\bP70h\b|P79HD 3G|G18d 3G|\bP79HD\b|\bP89s\b|\bA88\b|\bP10HD\b|\bP19HD\b|G18 3G|\bP78HD\b|\bA78\b|\bP75\b|G17s 3G|G17h 3G|\bP85t\b|\bP90\b|\bP11\b|\bP98t\b|\bP98HD\b|\bG18d\b|\bP85s\b|\bP11HD\b|\bP88s\b|\bA80HD\b|\bA80se\b|\bA10h\b|\bP89\b|\bP78s\b|\bG18\b|\bP85\b|\bA70h\b|\bA70\b|\bG17\b|\bP18\b|\bA80s\b|\bA11s\b|\bP88HD\b|\bA80h\b|\bP76s\b|\bP76h\b|\bP98\b|\bA10HD\b|\bP78\b|\bP88\b|\bA11\b|\bA10t\b|\bP76a\b|\bP76t\b|\bP76e\b|\bP85HD\b|\bP85a\b|\bP86\b|\bP75HD\b|\bP76v\b|\bA12\b|\bP75a\b|\bA15\b|\bP76Ti\b|\bP81HD\b|\bA10\b|\bT760VE\b|\bT720HD\b|\bP76\b|\bP73\b|\bP71\b|\bP72\b|\bT720SE\b|\bC520Ti\b|\bT760\b|\bT720VE\b|T720-3GE|T720-WiFi', 430 411 // Onda - http://www.onda-tablet.com/buy-android-onda.html?dir=desc&limit=all&order=price 431 'OndaTablet' => '\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\b[\s]+ ',412 'OndaTablet' => '\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\b[\s]+|V10 \b4G\b', 432 413 'JaytechTablet' => 'TPC-PA762', 433 414 'BlaupunktTablet' => 'Endeavour 800NG|Endeavour 1010', … … 449 430 // http://www.wolderelectronics.com/productos/manuales-y-guias-rapidas/categoria-2-miTab 450 431 'WolderTablet' => 'miTab \b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\b', 432 'MediacomTablet' => 'M-MPI10C3G|M-SP10EG|M-SP10EGP|M-SP10HXAH|M-SP7HXAH|M-SP10HXBH|M-SP8HXAH|M-SP8MXA', 451 433 // http://www.mi.com/en 452 434 'MiTablet' => '\bMI PAD\b|\bHM NOTE 1W\b', … … 471 453 // http://www.telstra.com.au/home-phone/thub-2/ 472 454 'TelstraTablet' => 'T-Hub2', 473 'GenericTablet' => 'Android.*\b97D\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\bA7EB\b|CatNova8|A1_07|CT704|CT1002|\bM721\b|rk30sdk|\bEVOTAB\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\bM6pro\b|CT1020W|arc 10HD|\bTP750\b|\bQTAQZ3\b '455 'GenericTablet' => 'Android.*\b97D\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\bA7EB\b|CatNova8|A1_07|CT704|CT1002|\bM721\b|rk30sdk|\bEVOTAB\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\bM6pro\b|CT1020W|arc 10HD|\bTP750\b|\bQTAQZ3\b|WVT101|TM1088|KT107' 474 456 ); 475 476 457 /** 477 458 * List of mobile Operating Systems. … … 485 466 'SymbianOS' => 'Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\bS60\b', 486 467 // @reference: http://en.wikipedia.org/wiki/Windows_Mobile 487 'WindowsMobileOS' => 'Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Window Mobile|Windows Phone [0-9.]+|WCE;',468 'WindowsMobileOS' => 'Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Windows Mobile|Windows Phone [0-9.]+|WCE;', 488 469 // @reference: http://en.wikipedia.org/wiki/Windows_Phone 489 470 // http://wifeng.cn/?r=blog&a=view&id=106 … … 493 474 'WindowsPhoneOS' => 'Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;', 494 475 'iOS' => '\biPhone.*Mobile|\biPod|\biPad|AppleCoreMedia', 476 // https://en.wikipedia.org/wiki/IPadOS 477 'iPadOS' => 'CPU OS 13', 495 478 // http://en.wikipedia.org/wiki/MeeGo 496 479 // @todo: research MeeGo in UAs … … 504 487 'BREWOS' => 'BREW', 505 488 ); 506 507 489 /** 508 490 * List of mobile User Agents. … … 520 502 'Chrome' => '\bCrMo\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?', 521 503 'Dolfin' => '\bDolfin\b', 522 'Opera' => 'Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR/[0-9.]+ |Coast/[0-9.]+',504 'Opera' => 'Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR/[0-9.]+$|Coast/[0-9.]+', 523 505 'Skyfire' => 'Skyfire', 524 506 'Edge' => 'Mobile Safari/[.0-9]* Edge', … … 533 515 //'Midori' => 'midori', 534 516 //'Tizen' => 'Tizen', 517 'WeChat' => '\bMicroMessenger\b', 535 518 'UCBrowser' => 'UC.*Browser|UCWEB', 536 519 'baiduboxapp' => 'baiduboxapp', … … 539 522 'DiigoBrowser' => 'DiigoBrowser', 540 523 // http://www.puffinbrowser.com/index.php 541 'Puffin' => 'Puffin', 524 // https://github.com/serbanghita/Mobile-Detect/issues/752 525 // 'Puffin' => 'Puffin', 542 526 // http://mercury-browser.com/index.html 543 527 'Mercury' => '\bMercury\b', … … 552 536 'PaleMoon' => 'Android.*PaleMoon|Mobile.*PaleMoon', 553 537 ); 554 555 538 /** 556 539 * Utilities. … … 563 546 // https://github.com/serbanghita/Mobile-Detect/issues/57#issuecomment-15024011 564 547 // https://developers.facebook.com/docs/sharing/best-practices 565 'Bot' => 'Googlebot|facebookexternalhit| AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|YandexMobileBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom',548 'Bot' => 'Googlebot|facebookexternalhit|Google-AMPHTML|s~amp-validator|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|YandexMobileBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom|contentkingapp', 566 549 'MobileBot' => 'Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2', 567 550 'DesktopMode' => 'WPDesktop', … … 569 552 'WebKit' => '(webkit)[ /]([\w.]+)', 570 553 // @todo: Include JXD consoles. 571 'Console' => '\b(Nintendo|Nintendo WiiU|Nintendo 3DS| PLAYSTATION|Xbox)\b',554 'Console' => '\b(Nintendo|Nintendo WiiU|Nintendo 3DS|Nintendo Switch|PLAYSTATION|Xbox)\b', 572 555 'Watch' => 'SM-V700', 573 556 ); 574 575 557 /** 576 558 * All possible HTTP headers that represent the … … 592 574 'HTTP_X_UCBROWSER_DEVICE_UA' 593 575 ); 594 595 576 /** 596 577 * The individual segments that could exist in a User-Agent string. VER refers to the regular … … 600 581 */ 601 582 protected static $properties = array( 602 603 583 // Build 604 584 'Mobile' => 'Mobile/[VER]', … … 606 586 'Version' => 'Version/[VER]', 607 587 'VendorID' => 'VendorID/[VER]', 608 609 588 // Devices 610 589 'iPad' => 'iPad.*CPU[a-z ]+[VER]', … … 613 592 //'BlackBerry' => array('BlackBerry[VER]', 'BlackBerry [VER];'), 614 593 'Kindle' => 'Kindle/[VER]', 615 616 594 // Browser 617 595 'Chrome' => array('Chrome/[VER]', 'CriOS/[VER]', 'CrMo/[VER]'), … … 645 623 'Webkit' => 'webkit[ /][VER]', 646 624 'PaleMoon' => 'PaleMoon/[VER]', 647 648 625 // Engine 649 626 'Gecko' => 'Gecko/[VER]', … … 651 628 'Presto' => 'Presto/[VER]', 652 629 'Goanna' => 'Goanna/[VER]', 653 654 630 // OS 655 631 'iOS' => ' \bi?OS\b [VER][ ;]{1}', … … 668 644 'webOS' => array('webOS/[VER]', 'hpwOS/[VER];'), 669 645 ); 670 671 646 /** 672 647 * Construct an instance of this class. … … 684 659 $this->setUserAgent($userAgent); 685 660 } 686 687 661 /** 688 662 * Get the current script version. … … 697 671 return self::VERSION; 698 672 } 699 700 673 /** 701 674 * Set the HTTP Headers. Must be PHP-flavored. This method will reset existing headers. … … 710 683 $httpHeaders = $_SERVER; 711 684 } 712 713 685 // clear existing headers 714 686 $this->httpHeaders = array(); 715 716 687 // Only save HTTP headers. In PHP land, that means only _SERVER vars that 717 688 // start with HTTP_. … … 721 692 } 722 693 } 723 724 694 // In case we're dealing with CloudFront, we need to know. 725 695 $this->setCfHeaders($httpHeaders); 726 696 } 727 728 697 /** 729 698 * Retrieves the HTTP headers. … … 735 704 return $this->httpHeaders; 736 705 } 737 738 706 /** 739 707 * Retrieves a particular header. If it doesn't exist, no exception/error is caused. … … 753 721 $header = strtoupper($header); 754 722 } 755 756 723 // test the alternate, too 757 724 $altHeader = 'HTTP_' . $header; 758 759 725 //Test both the regular and the HTTP_ prefix 760 726 if (isset($this->httpHeaders[$header])) { … … 763 729 return $this->httpHeaders[$altHeader]; 764 730 } 765 766 731 return null; 767 732 } 768 769 733 public function getMobileHeaders() 770 734 { 771 735 return self::$mobileHeaders; 772 736 } 773 774 737 /** 775 738 * Get all possible HTTP headers that … … 782 745 return self::$uaHttpHeaders; 783 746 } 784 785 786 747 /** 787 748 * Set CloudFront headers … … 797 758 $cfHeaders = $_SERVER; 798 759 } 799 800 760 // clear existing headers 801 761 $this->cloudfrontHeaders = array(); 802 803 762 // Only save CLOUDFRONT headers. In PHP land, that means only _SERVER vars that 804 763 // start with cloudfront-. … … 810 769 } 811 770 } 812 813 771 return $response; 814 772 } 815 816 773 /** 817 774 * Retrieves the cloudfront headers. … … 823 780 return $this->cloudfrontHeaders; 824 781 } 825 826 782 /** 827 783 * @param string $userAgent … … 833 789 return $userAgent; 834 790 } 835 836 791 /** 837 792 * Set the User-Agent to be used. … … 845 800 // Invalidate cache due to #375 846 801 $this->cache = array(); 847 848 802 if (false === empty($userAgent)) { 849 803 return $this->userAgent = $this->prepareUserAgent($userAgent); … … 855 809 } 856 810 } 857 858 811 if (!empty($this->userAgent)) { 859 812 return $this->userAgent = $this->prepareUserAgent($this->userAgent); 860 813 } 861 814 } 862 863 815 if (count($this->getCfHeaders()) > 0) { 864 816 return $this->userAgent = 'Amazon CloudFront'; … … 866 818 return $this->userAgent = null; 867 819 } 868 869 820 /** 870 821 * Retrieve the User-Agent. … … 876 827 return $this->userAgent; 877 828 } 878 879 829 /** 880 830 * Set the detection type. Must be one of self::DETECTION_TYPE_MOBILE or … … 891 841 $type = self::DETECTION_TYPE_MOBILE; 892 842 } 893 894 843 if ($type !== self::DETECTION_TYPE_MOBILE && $type !== self::DETECTION_TYPE_EXTENDED) { 895 844 return; 896 845 } 897 898 846 $this->detectionType = $type; 899 847 } 900 901 848 public function getMatchingRegex() 902 849 { 903 850 return $this->matchingRegex; 904 851 } 905 906 852 public function getMatchesArray() 907 853 { 908 854 return $this->matchesArray; 909 855 } 910 911 856 /** 912 857 * Retrieve the list of known phone devices. … … 918 863 return self::$phoneDevices; 919 864 } 920 921 865 /** 922 866 * Retrieve the list of known tablet devices. … … 928 872 return self::$tabletDevices; 929 873 } 930 931 874 /** 932 875 * Alias for getBrowsers() method. … … 938 881 return self::getBrowsers(); 939 882 } 940 941 883 /** 942 884 * Retrieve the list of known browsers. Specifically, the user agents. … … 948 890 return self::$browsers; 949 891 } 950 951 892 /** 952 893 * Retrieve the list of known utilities. … … 958 899 return self::$utilities; 959 900 } 960 961 901 /** 962 902 * Method gets the mobile detection rules. This method is used for the magic methods $detect->is*(). … … 969 909 { 970 910 static $rules; 971 972 911 if (!$rules) { 973 912 $rules = array_merge( … … 978 917 ); 979 918 } 980 981 919 return $rules; 982 983 } 984 920 } 985 921 /** 986 922 * Method gets the mobile detection rules + utilities. … … 996 932 { 997 933 static $rules; 998 999 934 if (!$rules) { 1000 935 // Merge all rules together. … … 1007 942 ); 1008 943 } 1009 1010 944 return $rules; 1011 945 } 1012 1013 946 /** 1014 947 * Retrieve the current set of rules. … … 1026 959 } 1027 960 } 1028 1029 961 /** 1030 962 * Retrieve the list of mobile operating systems. … … 1036 968 return self::$operatingSystems; 1037 969 } 1038 1039 970 /** 1040 971 * Check the HTTP headers for signs of mobile. … … 1046 977 public function checkHttpHeadersForMobile() 1047 978 { 1048 1049 979 foreach ($this->getMobileHeaders() as $mobileHeader => $matchType) { 1050 980 if (isset($this->httpHeaders[$mobileHeader])) { … … 1055 985 } 1056 986 } 1057 1058 987 return false; 1059 988 } else { … … 1062 991 } 1063 992 } 1064 1065 993 return false; 1066 1067 } 1068 994 } 1069 995 /** 1070 996 * Magic overloading method. … … 1082 1008 throw new BadMethodCallException("No such method exists: $name"); 1083 1009 } 1084 1085 1010 $this->setDetectionType(self::DETECTION_TYPE_MOBILE); 1086 1087 1011 $key = substr($name, 2); 1088 1089 1012 return $this->matchUAAgainstKey($key); 1090 1013 } 1091 1092 1014 /** 1093 1015 * Find a detection rule that matches the current User-agent. … … 1103 1025 continue; 1104 1026 } 1105 1106 1027 if ($this->match($_regex, $userAgent)) { 1107 1028 return true; 1108 1029 } 1109 1030 } 1110 1111 1031 return false; 1112 1032 } 1113 1114 1033 /** 1115 1034 * Search for a certain key in the rules array. … … 1126 1045 $key = strtolower($key); 1127 1046 if (false === isset($this->cache[$key])) { 1128 1129 1047 // change the keys to lower case 1130 1048 $_rules = array_change_key_case($this->getRules()); 1131 1132 1049 if (false === empty($_rules[$key])) { 1133 1050 $this->cache[$key] = $this->match($_rules[$key]); 1134 1051 } 1135 1136 1052 if (false === isset($this->cache[$key])) { 1137 1053 $this->cache[$key] = false; 1138 1054 } 1139 1055 } 1140 1141 1056 return $this->cache[$key]; 1142 1057 } 1143 1144 1058 /** 1145 1059 * Check if the device is mobile. … … 1151 1065 public function isMobile($userAgent = null, $httpHeaders = null) 1152 1066 { 1153 1154 1067 if ($httpHeaders) { 1155 1068 $this->setHttpHeaders($httpHeaders); 1156 1069 } 1157 1158 1070 if ($userAgent) { 1159 1071 $this->setUserAgent($userAgent); 1160 1072 } 1161 1162 1073 // Check specifically for cloudfront headers if the useragent === 'Amazon CloudFront' 1163 1074 if ($this->getUserAgent() === 'Amazon CloudFront') { … … 1167 1078 } 1168 1079 } 1169 1170 1080 $this->setDetectionType(self::DETECTION_TYPE_MOBILE); 1171 1172 1081 if ($this->checkHttpHeadersForMobile()) { 1173 1082 return true; … … 1175 1084 return $this->matchDetectionRulesAgainstUA(); 1176 1085 } 1177 1178 } 1179 1086 } 1180 1087 /** 1181 1088 * Check if the device is a tablet. … … 1195 1102 } 1196 1103 } 1197 1198 1104 $this->setDetectionType(self::DETECTION_TYPE_MOBILE); 1199 1200 1105 foreach (self::$tabletDevices as $_regex) { 1201 1106 if ($this->match($_regex, $userAgent)) { … … 1203 1108 } 1204 1109 } 1205 1206 1110 return false; 1207 1111 } 1208 1209 1112 /** 1210 1113 * This method checks for a certain property in the … … 1223 1126 $this->setHttpHeaders($httpHeaders); 1224 1127 } 1225 1226 1128 if ($userAgent) { 1227 1129 $this->setUserAgent($userAgent); 1228 1130 } 1229 1230 1131 $this->setDetectionType(self::DETECTION_TYPE_EXTENDED); 1231 1232 1132 return $this->matchUAAgainstKey($key); 1233 1133 } 1234 1235 1134 /** 1236 1135 * Some detection rules are relative (not standard), … … 1256 1155 $this->matchesArray = $matches; 1257 1156 } 1258 1259 1157 return $match; 1260 1158 } 1261 1262 1159 /** 1263 1160 * Get the properties array. … … 1269 1166 return self::$properties; 1270 1167 } 1271 1272 1168 /** 1273 1169 * Prepare the version number. … … 1283 1179 $ver = str_replace(array('_', ' ', '/'), '.', $ver); 1284 1180 $arrVer = explode('.', $ver, 2); 1285 1286 1181 if (isset($arrVer[1])) { 1287 1182 $arrVer[1] = @str_replace('.', '', $arrVer[1]); // @todo: treat strings versions. 1288 1183 } 1289 1290 1184 return (float) implode('.', $arrVer); 1291 1185 } 1292 1293 1186 /** 1294 1187 * Check the version of the given property in the User-Agent. … … 1309 1202 return false; 1310 1203 } 1311 1312 1204 // set the $type to the default if we don't recognize the type 1313 1205 if ($type !== self::VERSION_TYPE_STRING && $type !== self::VERSION_TYPE_FLOAT) { 1314 1206 $type = self::VERSION_TYPE_STRING; 1315 1207 } 1316 1317 1208 $properties = self::getProperties(); 1318 1319 1209 // Check if the property exists in the properties array. 1320 1210 if (true === isset($properties[$propertyName])) { 1321 1322 1211 // Prepare the pattern to be matched. 1323 1212 // Make sure we always deal with an array (string is converted). 1324 1213 $properties[$propertyName] = (array) $properties[$propertyName]; 1325 1326 1214 foreach ($properties[$propertyName] as $propertyMatchString) { 1327 1328 1215 $propertyPattern = str_replace('[VER]', self::VER, $propertyMatchString); 1329 1330 1216 // Identify and extract the version. 1331 1217 preg_match(sprintf('#%s#is', $propertyPattern), $this->userAgent, $match); 1332 1333 1218 if (false === empty($match[1])) { 1334 1219 $version = ($type == self::VERSION_TYPE_FLOAT ? $this->prepareVersionNo($match[1]) : $match[1]); 1335 1336 1220 return $version; 1337 1221 } 1338 1339 1222 } 1340 1341 } 1342 1223 } 1343 1224 return false; 1344 1225 } 1345 1346 1226 /** 1347 1227 * Retrieve the mobile grading, using self::MOBILE_GRADE_* constants. … … 1352 1232 { 1353 1233 $isMobile = $this->isMobile(); 1354 1355 1234 if ( 1356 1235 // Apple iOS 4-7.0 – Tested on the original iPad (4.3 / 5.0), iPad 2 (4.3 / 5.1 / 6.1), iPad 3 (5.1 / 6.0), iPad Mini (6.1), iPad Retina (7.0), iPhone 3GS (4.3), iPhone 4 (4.3 / 5.1), iPhone 4S (5.1 / 6.0), iPhone 5 (6.0), and iPhone 5S (7.0) … … 1358 1237 $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT) >= 4.3 || 1359 1238 $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT) >= 4.3 || 1360 1361 1239 // Android 2.1-2.3 - Tested on the HTC Incredible (2.2), original Droid (2.2), HTC Aria (2.1), Google Nexus S (2.3). Functional on 1.5 & 1.6 but performance may be sluggish, tested on Google G1 (1.5) 1362 1240 // Android 3.1 (Honeycomb) - Tested on the Samsung Galaxy Tab 10.1 and Motorola XOOM … … 1364 1242 // Android 4.1 (Jelly Bean) - Tested on a Galaxy Nexus and Galaxy 7 1365 1243 ( $this->version('Android', self::VERSION_TYPE_FLOAT)>2.1 && $this->is('Webkit') ) || 1366 1367 1244 // Windows Phone 7.5-8 - Tested on the HTC Surround (7.5), HTC Trophy (7.5), LG-E900 (7.5), Nokia 800 (7.8), HTC Mazaa (7.8), Nokia Lumia 520 (8), Nokia Lumia 920 (8), HTC 8x (8) 1368 1245 $this->version('Windows Phone OS', self::VERSION_TYPE_FLOAT) >= 7.5 || 1369 1370 1246 // Tested on the Torch 9800 (6) and Style 9670 (6), BlackBerry® Torch 9810 (7), BlackBerry Z10 (10) 1371 1247 $this->is('BlackBerry') && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) >= 6.0 || 1372 1248 // Blackberry Playbook (1.0-2.0) - Tested on PlayBook 1373 1249 $this->match('Playbook.*Tablet') || 1374 1375 1250 // Palm WebOS (1.4-3.0) - Tested on the Palm Pixi (1.4), Pre (1.4), Pre 2 (2.0), HP TouchPad (3.0) 1376 1251 ( $this->version('webOS', self::VERSION_TYPE_FLOAT) >= 1.4 && $this->match('Palm|Pre|Pixi') ) || 1377 1252 // Palm WebOS 3.0 - Tested on HP TouchPad 1378 1253 $this->match('hp.*TouchPad') || 1379 1380 1254 // Firefox Mobile 18 - Tested on Android 2.3 and 4.1 devices 1381 1255 ( $this->is('Firefox') && $this->version('Firefox', self::VERSION_TYPE_FLOAT) >= 18 ) || 1382 1383 1256 // Chrome for Android - Tested on Android 4.0, 4.1 device 1384 1257 ( $this->is('Chrome') && $this->is('AndroidOS') && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 4.0 ) || 1385 1386 1258 // Skyfire 4.1 - Tested on Android 2.3 device 1387 1259 ( $this->is('Skyfire') && $this->version('Skyfire', self::VERSION_TYPE_FLOAT) >= 4.1 && $this->is('AndroidOS') && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3 ) || 1388 1389 1260 // Opera Mobile 11.5-12: Tested on Android 2.3 1390 1261 ( $this->is('Opera') && $this->version('Opera Mobi', self::VERSION_TYPE_FLOAT) >= 11.5 && $this->is('AndroidOS') ) || 1391 1392 1262 // Meego 1.2 - Tested on Nokia 950 and N9 1393 1263 $this->is('MeeGoOS') || 1394 1395 1264 // Tizen (pre-release) - Tested on early hardware 1396 1265 $this->is('Tizen') || 1397 1398 1266 // Samsung Bada 2.0 - Tested on a Samsung Wave 3, Dolphin browser 1399 1267 // @todo: more tests here! 1400 1268 $this->is('Dolfin') && $this->version('Bada', self::VERSION_TYPE_FLOAT) >= 2.0 || 1401 1402 1269 // UC Browser - Tested on Android 2.3 device 1403 1270 ( ($this->is('UC Browser') || $this->is('Dolfin')) && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3 ) || 1404 1405 1271 // Kindle 3 and Fire - Tested on the built-in WebKit browser for each 1406 1272 ( $this->match('Kindle Fire') || 1407 1273 $this->is('Kindle') && $this->version('Kindle', self::VERSION_TYPE_FLOAT) >= 3.0 ) || 1408 1409 1274 // Nook Color 1.4.1 - Tested on original Nook Color, not Nook Tablet 1410 1275 $this->is('AndroidOS') && $this->is('NookTablet') || 1411 1412 1276 // Chrome Desktop 16-24 - Tested on OS X 10.7 and Windows 7 1413 1277 $this->version('Chrome', self::VERSION_TYPE_FLOAT) >= 16 && !$isMobile || 1414 1415 1278 // Safari Desktop 5-6 - Tested on OS X 10.7 and Windows 7 1416 1279 $this->version('Safari', self::VERSION_TYPE_FLOAT) >= 5.0 && !$isMobile || 1417 1418 1280 // Firefox Desktop 10-18 - Tested on OS X 10.7 and Windows 7 1419 1281 $this->version('Firefox', self::VERSION_TYPE_FLOAT) >= 10.0 && !$isMobile || 1420 1421 1282 // Internet Explorer 7-9 - Tested on Windows XP, Vista and 7 1422 1283 $this->version('IE', self::VERSION_TYPE_FLOAT) >= 7.0 && !$isMobile || 1423 1424 1284 // Opera Desktop 10-12 - Tested on OS X 10.7 and Windows 7 1425 1285 $this->version('Opera', self::VERSION_TYPE_FLOAT) >= 10 && !$isMobile … … 1427 1287 return self::MOBILE_GRADE_A; 1428 1288 } 1429 1430 1289 if ( 1431 1290 $this->is('iOS') && $this->version('iPad', self::VERSION_TYPE_FLOAT)<4.3 || 1432 1291 $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT)<4.3 || 1433 1292 $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT)<4.3 || 1434 1435 1293 // Blackberry 5.0: Tested on the Storm 2 9550, Bold 9770 1436 1294 $this->is('Blackberry') && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) >= 5 && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT)<6 || 1437 1438 1295 //Opera Mini (5.0-6.5) - Tested on iOS 3.2/4.3 and Android 2.3 1439 1296 ($this->version('Opera Mini', self::VERSION_TYPE_FLOAT) >= 5.0 && $this->version('Opera Mini', self::VERSION_TYPE_FLOAT) <= 7.0 && 1440 1297 ($this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3 || $this->is('iOS')) ) || 1441 1442 1298 // Nokia Symbian^3 - Tested on Nokia N8 (Symbian^3), C7 (Symbian^3), also works on N97 (Symbian^1) 1443 1299 $this->match('NokiaN8|NokiaC7|N97.*Series60|Symbian/3') || 1444 1445 1300 // @todo: report this (tested on Nokia N71) 1446 1301 $this->version('Opera Mobi', self::VERSION_TYPE_FLOAT) >= 11 && $this->is('SymbianOS') … … 1448 1303 return self::MOBILE_GRADE_B; 1449 1304 } 1450 1451 1305 if ( 1452 1306 // Blackberry 4.x - Tested on the Curve 8330 … … 1454 1308 // Windows Mobile - Tested on the HTC Leo (WinMo 5.2) 1455 1309 $this->match('MSIEMobile|Windows CE.*Mobile') || $this->version('Windows Mobile', self::VERSION_TYPE_FLOAT) <= 5.2 || 1456 1457 1310 // Tested on original iPhone (3.1), iPhone 3 (3.2) 1458 1311 $this->is('iOS') && $this->version('iPad', self::VERSION_TYPE_FLOAT) <= 3.2 || 1459 1312 $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT) <= 3.2 || 1460 1313 $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT) <= 3.2 || 1461 1462 1314 // Internet Explorer 7 and older - Tested on Windows XP 1463 1315 $this->version('IE', self::VERSION_TYPE_FLOAT) <= 7.0 && !$isMobile … … 1465 1317 return self::MOBILE_GRADE_C; 1466 1318 } 1467 1468 1319 // All older smartphone platforms and featurephones - Any device that doesn't support media queries 1469 1320 // will receive the basic, C grade experience. -
unreal-themes-switching/trunk/readme.txt
r1872377 r2220600 1 === Unreal themes switching ===1 === Unreal Themes switching === 2 2 3 3 Contributors: Roman Bondarenko 4 4 Tags: switch theme, themes, mobile, tablet, desktop, theme, active theme, iphone, ipad, android, blackberry, windows, device, smartphone,admin,plugin,posts,post,page 5 5 Requires at least: 3.4.0 6 Tested up to: 4.96 Tested up to: 5.3.2 7 7 Stable tag: trunk 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 10 11 "Unreal themes switching" allows to swap the active theme to another one, when your website is loaded on mobile devices or desktop browsers depending to the device type11 "Unreal Themes switching" allows to swap the active theme to another one, when your website is loaded on mobile devices or desktop browsers depending to the device type 12 12 13 13 … … 32 32 3. Type the plugin name "Theme Switch in Mobile and Desktop" 33 33 4. Finally, install and activate the plugin 34 35 == Changelog == 36 37 1. update library 38 2. fixed code -
unreal-themes-switching/trunk/settings.php
r1872377 r2220600 5 5 * Create page options 6 6 */ 7 add_action('admin_menu', 'u nreal_add_plugin_page');7 add_action('admin_menu', 'ut_add_plugin_page'); 8 8 9 function u nreal_add_plugin_page(){9 function ut_add_plugin_page(){ 10 10 11 add_options_page( 'Setting "Themes Switching"', 'Themes Switching', 'manage_options', 'themes_switching', 'unreal_options_page_output' );11 add_options_page( __( 'Settings' ) . ' "Themes Switching"', 'Themes Switching', 'manage_options', 'themes_switching', 'ut_options_page_output' ); 12 12 } 13 13 14 function u nreal_options_page_output(){14 function ut_options_page_output(){ 15 15 ?> 16 16 <div class="wrap"> … … 18 18 <form action="options.php" method="POST"> 19 19 <?php 20 settings_fields( 'u nreal_group' );21 do_settings_sections( 'u nreal_page' );20 settings_fields( 'ut_group' ); 21 do_settings_sections( 'ut_page' ); 22 22 submit_button(); 23 23 ?> … … 31 31 * Register settings 32 32 */ 33 add_action('admin_init', 'u nreal_plugin_settings');33 add_action('admin_init', 'ut_plugin_settings'); 34 34 35 function u nreal_plugin_settings(){35 function ut_plugin_settings(){ 36 36 37 register_setting( 'u nreal_group', 'unreal_option', 'sanitize_callback' );37 register_setting( 'ut_group', 'ut_option', 'sanitize_callback' ); 38 38 39 add_settings_section( 'u nreal_id', '', '', 'unreal_page' );39 add_settings_section( 'ut_id', '', '', 'ut_page' ); 40 40 41 add_settings_field('u nreal_desktop', __('Active Theme'), 'unreal_active_theme', 'unreal_page', 'unreal_id' );42 add_settings_field('u nreal_tablet', __('Theme for Tablet'), 'unreal_field_tablet', 'unreal_page', 'unreal_id' );43 add_settings_field('u nreal_phone', __('Theme for Phone'), 'unreal_field_phone', 'unreal_page', 'unreal_id' );41 add_settings_field('ut_desktop', __('Active Theme'), 'ut_active_theme', 'ut_page', 'ut_id' ); 42 add_settings_field('ut_tablet', __('Theme for Tablet'), 'ut_field_tablet', 'ut_page', 'ut_id' ); 43 add_settings_field('ut_phone', __('Theme for Phone'), 'ut_field_phone', 'ut_page', 'ut_id' ); 44 44 } 45 46 47 /** 48 * Add a settings link to your WordPress plugin on the plugin listing page. 49 */ 50 function ut_add_settings_link( $links ) { 51 // Build and escape the URL. 52 $url = esc_url( add_query_arg( 53 'page', 54 'themes_switching', 55 get_admin_url() . 'admin.php' 56 ) ); 57 // Create the link. 58 $settings_link = "<a href='$url'>" . __( 'Settings' ) . '</a>'; 59 // Adds the link to the end of the array. 60 array_push( 61 $links, 62 $settings_link 63 ); 64 return $links; 65 } 66 add_filter( 'plugin_action_links_unreal-themes-switching/unreal-themes-switching.php', 'ut_add_settings_link' ); 45 67 46 68 … … 48 70 * Desktop 49 71 */ 50 function u nreal_active_theme(){72 function ut_active_theme(){ 51 73 52 74 $current_theme = wp_get_theme(); … … 62 84 * Tablet 63 85 */ 64 function u nreal_field_tablet(){86 function ut_field_tablet(){ 65 87 66 $val = get_option('u nreal_option');88 $val = get_option('ut_option'); 67 89 $val = $val ? $val['tablet'] : null; 68 90 $themes = wp_get_themes(); ?> 69 91 70 <select name="u nreal_option[tablet]">92 <select name="ut_option[tablet]"> 71 93 <option value="0"><?php echo __('- Select -'); ?></option> 72 94 <?php foreach( (array)$themes as $theme ): ?> … … 88 110 * Phone 89 111 */ 90 function u nreal_field_phone(){112 function ut_field_phone(){ 91 113 92 $val = get_option('u nreal_option');114 $val = get_option('ut_option'); 93 115 $val = $val ? $val['phone'] : null; 94 116 $themes = wp_get_themes(); ?> 95 117 96 <select name="u nreal_option[phone]">118 <select name="ut_option[phone]"> 97 119 <option value="0"><?php echo __('- Select -'); ?></option> 98 120 <?php foreach( (array)$themes as $theme ): ?> -
unreal-themes-switching/trunk/uninstall.php
r1872377 r2220600 1 1 <?php 2 2 3 if ( !defined('ABSPATH') || !defined('WP_UNINSTALL_PLUGIN')) {4 exit(); // silence is golden 3 if ( ! defined('ABSPATH') || ! defined('WP_UNINSTALL_PLUGIN') ) { 4 exit(); 5 5 } 6 6 7 delete_option('u nreal_option');7 delete_option('ut_option'); -
unreal-themes-switching/trunk/unreal-themes-switching.php
r1872377 r2220600 2 2 /** 3 3 * Plugin Name: Unreal themes switching 4 * Plugin URI: https://wordpress.org/plugins/ 4 * Plugin URI: https://wordpress.org/plugins/unreal-themes-switching/ 5 5 * Description: "Unreal Themes Switching" allows to swap the active theme to another one, when your website is loaded on a mobile device. With "Mobile Theme Switch" plugin, you can select different themes, without having to activate the theme previously. The plugin has very simple and understandable settings, so that everyone can figure it out and set up their site. 6 * Version: 1. 0.06 * Version: 1.2 7 7 * Author: Roman Bondarenko 8 * Author URI: http ://romchyk16.xyz/8 * Author URI: https://unrealthemes.ru/ 9 9 */ 10 10
Note: See TracChangeset
for help on using the changeset viewer.