Plugin Directory

Changeset 2220600


Ignore:
Timestamp:
01/01/2020 08:27:22 PM (6 years ago)
Author:
romchyk16
Message:

update

Location:
unreal-themes-switching/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • unreal-themes-switching/trunk/functions.php

    r1872377 r2220600  
    44 * Change theme
    55 */
    6 add_filter('template', 'unreal_change_theme');
    7 add_filter('option_template', 'unreal_change_theme');
    8 add_filter('option_stylesheet', 'unreal_change_theme');
     6add_filter('template', 'ut_change_theme');
     7add_filter('option_template', 'ut_change_theme');
     8add_filter('option_stylesheet', 'ut_change_theme');
    99
    10 function unreal_change_theme($template) {
     10function ut_change_theme($template) {
    1111
    1212    /* class mobile detect */
     
    1414
    1515    $detect     = new Mobile_Detect;
    16     $options    = get_option('unreal_option');
     16    $options    = get_option('ut_option');
    1717    $deviceType = ($detect->isMobile() ? ($detect->isTablet() ? 'tablet' : 'phone') : 'computer');
    1818
    19     $template_tablet = (in_array($options['tablet'], unreal_get_array_themes())) ? $options['tablet'] : $template;
    20     $template_phone  = (in_array($options['phone'], unreal_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;
    2121
    2222    switch($deviceType):
     
    3939}
    4040
    41 function unreal_get_array_themes(){
     41function ut_get_array_themes(){
    4242   
    4343    $result = array();
  • unreal-themes-switching/trunk/lib/mobile-detect.php

    r1872377 r2220600  
    22/**
    33 * Mobile Detect Library
    4  * =====================
    5  *
    64 * Motto: "Every business should have a mobile detection script to detect mobile readers"
    75 *
     
    97 * It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.
    108 *
    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
    1315 *
    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]>
    1520 *
    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
    2622 */
    27 
    2823class Mobile_Detect
    2924{
     
    3429     */
    3530    const DETECTION_TYPE_MOBILE     = 'mobile';
    36 
    3731    /**
    3832     * Extended detection type.
     
    4135     */
    4236    const DETECTION_TYPE_EXTENDED   = 'extended';
    43 
    4437    /**
    4538     * A frequently used regular expression to extract version #s.
     
    4841     */
    4942    const VER                       = '([\w._\+]+)';
    50 
    5143    /**
    5244     * Top-level device.
    5345     */
    5446    const MOBILE_GRADE_A            = 'A';
    55 
    5647    /**
    5748     * Mid-level device.
    5849     */
    5950    const MOBILE_GRADE_B            = 'B';
    60 
    6151    /**
    6252     * Low-level device.
    6353     */
    6454    const MOBILE_GRADE_C            = 'C';
    65 
    6655    /**
    6756     * Stores the version number of the current release.
    6857     */
    69     const VERSION                   = '2.8.30';
    70 
     58    const VERSION                   = '2.8.34';
    7159    /**
    7260     * A type for the version() method indicating a string return value.
    7361     */
    7462    const VERSION_TYPE_STRING       = 'text';
    75 
    7663    /**
    7764     * A type for the version() method indicating a float return value.
    7865     */
    7966    const VERSION_TYPE_FLOAT        = 'float';
    80 
    8167    /**
    8268     * A cache for resolved matches
     
    8470     */
    8571    protected $cache = array();
    86 
    8772    /**
    8873     * The User-Agent HTTP header is stored in here.
     
    9075     */
    9176    protected $userAgent = null;
    92 
    9377    /**
    9478     * HTTP headers in the PHP-flavor. So HTTP_USER_AGENT and SERVER_SOFTWARE.
     
    9680     */
    9781    protected $httpHeaders = array();
    98 
    9982    /**
    10083     * CloudFront headers. E.g. CloudFront-Is-Desktop-Viewer, CloudFront-Is-Mobile-Viewer & CloudFront-Is-Tablet-Viewer.
     
    10285     */
    10386    protected $cloudfrontHeaders = array();
    104 
    10587    /**
    10688     * The matching Regex.
     
    10991     */
    11092    protected $matchingRegex = null;
    111 
    11293    /**
    11394     * The matches extracted from the regex expression.
    11495     * This is good for debug.
     96     *
    11597     * @var string
    11698     */
    11799    protected $matchesArray = null;
    118 
    119100    /**
    120101     * The detection type, using self::DETECTION_TYPE_MOBILE or self::DETECTION_TYPE_EXTENDED.
     
    125106     */
    126107    protected $detectionType = self::DETECTION_TYPE_MOBILE;
    127 
    128108    /**
    129109     * HTTP headers that trigger the 'isMobile' detection
     
    133113     */
    134114    protected static $mobileHeaders = array(
    135 
    136115            'HTTP_ACCEPT'                  => array('matches' => array(
    137116                                                                        // Opera Mini; @reference: http://dev.opera.com/articles/view/opera-binary-markup-language/
     
    161140            'HTTP_UA_CPU'                  => array('matches' => array('ARM')),
    162141    );
    163 
    164142    /**
    165143     * List of mobile devices (phones).
     
    169147    protected static $phoneDevices = array(
    170148        '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]+',
    172150        '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',
    173151        'Nexus'         => 'Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6',
    174152        // @todo: Is 'Dell Streak' a tablet or a phone? ;)
    175153        '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',
    179157        'Sony'          => 'SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533',
    180158        'Asus'          => 'Asus.*Galaxy|PadFone.*Mobile',
     
    201179        'Wolfgang'      => 'AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q',
    202180        'Alcatel'       => 'Alcatel',
    203         'Nintendo' => 'Nintendo 3DS',
     181        'Nintendo'      => 'Nintendo (3DS|Switch)',
    204182        // http://en.wikipedia.org/wiki/Amoi
    205183        'Amoi'          => 'Amoi',
    206184        // http://en.wikipedia.org/wiki/INQ
    207185        'INQ'           => 'INQ',
     186        'OnePlus'       => 'ONEPLUS',
    208187        // @Tapatalk is a mobile app; http://support.tapatalk.com/threads/smf-2-0-2-os-and-browser-detection-plugin-and-tapatalk.15565/#post-79039
    209188        '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',
    210189    );
    211 
    212190    /**
    213191     * List of tablet devices.
     
    220198        // Removed |^.*Android.*Nexus(?!(?:Mobile).)*$
    221199        // @see #442
     200        // @todo Merge NexusTablet into GoogleTablet.
    222201        '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.
    224205        // http://docs.aws.amazon.com/silk/latest/developerguide/user-agent.html
    225206        '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)',
     
    231212        // Watch out for PadFone, see #132.
    232213        // 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',
    234215        'BlackBerryTablet'  => 'PlayBook|RIM Tablet',
    235216        'HTCtablet'         => 'HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410',
     
    253234        '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',
    254235        // 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-X304F|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',
    256237        // http://www.dell.com/support/home/us/en/04/Products/tab_mob/tablets
    257238        'DellTablet'        => 'Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7',
     
    279260        // Readers http://www.atsuhiro-me.net/ebook/sony-reader/sony-reader-web-browser
    280261        // 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|SGP612|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',
    282263        // 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
    283264        'PhilipsTablet'     => '\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\b',
     
    303284        'FlyTablet'         => 'IQ310|Fly Vision',
    304285        // 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',
    306287        // http://www.huaweidevice.com/worldwide/productFamily.do?method=index&directoryId=5011&treeId=3290
    307288        // 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',
    309290        // Nec or Medias Tab
    310291        'NecTablet'         => '\bN-06D|\bN-08D',
     
    316297        'VersusTablet'      => 'TOUCHPAD.*[78910]|\bTOUCHTAB\b',
    317298        // http://www.zync.in/index.php/our-products/tablet-phablets
    318         'ZyncTablet'        => 'z1000|Z99 2G|z99|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
    319300        // http://www.positivoinformatica.com.br/www/pessoal/tablet-ypy/
    320301        'PositivoTablet'    => 'TB07STA|TB10STA|TB07FTA|TB10FTA',
     
    338319        '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',
    339320        // http://www.galapad.net/product.html
    340         'GalapadTablet'     => 'Android.*\bG1\b',
     321        'GalapadTablet'     => 'Android.*\bG1\b(?!\))',
    341322        // http://www.micromaxinfo.com/tablet/funbook
    342323        'MicromaxTablet'    => 'Funbook|Micromax.*\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\b',
     
    379360        // Modecom Tablets - http://www.modecom.eu/tablets/portal/
    380361        '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/tablets
     362        // Vonino Tablets
    382363        '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',
    383364        // ECS Tablets - http://www.ecs.com.tw/ECSWebSite/Product/Product_Tablet_List.aspx?CategoryID=14&MenuID=107&childid=M_107&LanID=0
     
    387368        'StorexTablet'  => 'eZee[_\']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab',
    388369        // Generic Vodafone tablets.
    389         'VodafoneTablet' => 'SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497',
     370        'VodafoneTablet' => 'SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497|VFD 1400',
    390371        // French tablets - Essentiel B http://www.boulanger.fr/tablette_tactile_e-book/tablette_tactile_essentiel_b/cl_68908.htm?multiChoiceToDelete=brand&mc_brand=essentielb
    391372        // Aka: http://www.essentielb.fr/
     
    406387        'SkkTablet' => 'Android.* (SKYPAD|PHOENIX|CYCLOPS)',
    407388        // 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',
    409390        // JXD (consoles & tablets) - http://jxd.hk/products.asp?selectclassid=009008&clsid=3
    410391        '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',
     
    429410        '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',
    430411        // 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',
    432413        'JaytechTablet'     => 'TPC-PA762',
    433414        'BlaupunktTablet'   => 'Endeavour 800NG|Endeavour 1010',
     
    449430        // http://www.wolderelectronics.com/productos/manuales-y-guias-rapidas/categoria-2-miTab
    450431        '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',
    451433        // http://www.mi.com/en
    452434        'MiTablet' => '\bMI PAD\b|\bHM NOTE 1W\b',
     
    471453        // http://www.telstra.com.au/home-phone/thub-2/
    472454        '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'
    474456    );
    475 
    476457    /**
    477458     * List of mobile Operating Systems.
     
    485466        'SymbianOS'         => 'Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\bS60\b',
    486467        // @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;',
    488469        // @reference: http://en.wikipedia.org/wiki/Windows_Phone
    489470        // http://wifeng.cn/?r=blog&a=view&id=106
     
    493474        'WindowsPhoneOS'   => 'Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;',
    494475        'iOS'               => '\biPhone.*Mobile|\biPod|\biPad|AppleCoreMedia',
     476        // https://en.wikipedia.org/wiki/IPadOS
     477        'iPadOS' => 'CPU OS 13',
    495478        // http://en.wikipedia.org/wiki/MeeGo
    496479        // @todo: research MeeGo in UAs
     
    504487        'BREWOS'            => 'BREW',
    505488    );
    506 
    507489    /**
    508490     * List of mobile User Agents.
     
    520502        'Chrome'          => '\bCrMo\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?',
    521503        '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.]+',
    523505        'Skyfire'         => 'Skyfire',
    524506        'Edge'             => 'Mobile Safari/[.0-9]* Edge',
     
    533515        //'Midori'          => 'midori',
    534516        //'Tizen'           => 'Tizen',
     517        'WeChat'          => '\bMicroMessenger\b',
    535518        'UCBrowser'       => 'UC.*Browser|UCWEB',
    536519        'baiduboxapp'     => 'baiduboxapp',
     
    539522        'DiigoBrowser'    => 'DiigoBrowser',
    540523        // http://www.puffinbrowser.com/index.php
    541         'Puffin'            => 'Puffin',
     524        // https://github.com/serbanghita/Mobile-Detect/issues/752
     525        // 'Puffin'            => 'Puffin',
    542526        // http://mercury-browser.com/index.html
    543527        'Mercury'          => '\bMercury\b',
     
    552536        'PaleMoon'        => 'Android.*PaleMoon|Mobile.*PaleMoon',
    553537    );
    554 
    555538    /**
    556539     * Utilities.
     
    563546        // https://github.com/serbanghita/Mobile-Detect/issues/57#issuecomment-15024011
    564547        // 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',
    566549        'MobileBot'   => 'Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2',
    567550        'DesktopMode' => 'WPDesktop',
     
    569552        'WebKit'      => '(webkit)[ /]([\w.]+)',
    570553        // @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',
    572555        'Watch'       => 'SM-V700',
    573556    );
    574 
    575557    /**
    576558     * All possible HTTP headers that represent the
     
    592574        'HTTP_X_UCBROWSER_DEVICE_UA'
    593575    );
    594 
    595576    /**
    596577     * The individual segments that could exist in a User-Agent string. VER refers to the regular
     
    600581     */
    601582    protected static $properties = array(
    602 
    603583        // Build
    604584        'Mobile'        => 'Mobile/[VER]',
     
    606586        'Version'       => 'Version/[VER]',
    607587        'VendorID'      => 'VendorID/[VER]',
    608 
    609588        // Devices
    610589        'iPad'          => 'iPad.*CPU[a-z ]+[VER]',
     
    613592        //'BlackBerry'    => array('BlackBerry[VER]', 'BlackBerry [VER];'),
    614593        'Kindle'        => 'Kindle/[VER]',
    615 
    616594        // Browser
    617595        'Chrome'        => array('Chrome/[VER]', 'CriOS/[VER]', 'CrMo/[VER]'),
     
    645623        'Webkit'        => 'webkit[ /][VER]',
    646624        'PaleMoon'         => 'PaleMoon/[VER]',
    647 
    648625        // Engine
    649626        'Gecko'         => 'Gecko/[VER]',
     
    651628        'Presto'        => 'Presto/[VER]',
    652629        'Goanna'           => 'Goanna/[VER]',
    653 
    654630        // OS
    655631        'iOS'              => ' \bi?OS\b [VER][ ;]{1}',
     
    668644        'webOS'            => array('webOS/[VER]', 'hpwOS/[VER];'),
    669645    );
    670 
    671646    /**
    672647     * Construct an instance of this class.
     
    684659        $this->setUserAgent($userAgent);
    685660    }
    686 
    687661    /**
    688662     * Get the current script version.
     
    697671        return self::VERSION;
    698672    }
    699 
    700673    /**
    701674     * Set the HTTP Headers. Must be PHP-flavored. This method will reset existing headers.
     
    710683            $httpHeaders = $_SERVER;
    711684        }
    712 
    713685        // clear existing headers
    714686        $this->httpHeaders = array();
    715 
    716687        // Only save HTTP headers. In PHP land, that means only _SERVER vars that
    717688        // start with HTTP_.
     
    721692            }
    722693        }
    723 
    724694        // In case we're dealing with CloudFront, we need to know.
    725695        $this->setCfHeaders($httpHeaders);
    726696    }
    727 
    728697    /**
    729698     * Retrieves the HTTP headers.
     
    735704        return $this->httpHeaders;
    736705    }
    737 
    738706    /**
    739707     * Retrieves a particular header. If it doesn't exist, no exception/error is caused.
     
    753721            $header = strtoupper($header);
    754722        }
    755 
    756723        // test the alternate, too
    757724        $altHeader = 'HTTP_' . $header;
    758 
    759725        //Test both the regular and the HTTP_ prefix
    760726        if (isset($this->httpHeaders[$header])) {
     
    763729            return $this->httpHeaders[$altHeader];
    764730        }
    765 
    766731        return null;
    767732    }
    768 
    769733    public function getMobileHeaders()
    770734    {
    771735        return self::$mobileHeaders;
    772736    }
    773 
    774737    /**
    775738     * Get all possible HTTP headers that
     
    782745        return self::$uaHttpHeaders;
    783746    }
    784 
    785 
    786747    /**
    787748     * Set CloudFront headers
     
    797758            $cfHeaders = $_SERVER;
    798759        }
    799 
    800760        // clear existing headers
    801761        $this->cloudfrontHeaders = array();
    802 
    803762        // Only save CLOUDFRONT headers. In PHP land, that means only _SERVER vars that
    804763        // start with cloudfront-.
     
    810769            }
    811770        }
    812 
    813771        return $response;
    814772    }
    815 
    816773    /**
    817774     * Retrieves the cloudfront headers.
     
    823780        return $this->cloudfrontHeaders;
    824781    }
    825 
    826782    /**
    827783     * @param string $userAgent
     
    833789        return $userAgent;
    834790    }
    835 
    836791    /**
    837792     * Set the User-Agent to be used.
     
    845800        // Invalidate cache due to #375
    846801        $this->cache = array();
    847 
    848802        if (false === empty($userAgent)) {
    849803            return $this->userAgent = $this->prepareUserAgent($userAgent);
     
    855809                }
    856810            }
    857 
    858811            if (!empty($this->userAgent)) {
    859812                return $this->userAgent = $this->prepareUserAgent($this->userAgent);
    860813            }
    861814        }
    862 
    863815        if (count($this->getCfHeaders()) > 0) {
    864816            return $this->userAgent = 'Amazon CloudFront';
     
    866818        return $this->userAgent = null;
    867819    }
    868 
    869820    /**
    870821     * Retrieve the User-Agent.
     
    876827        return $this->userAgent;
    877828    }
    878 
    879829    /**
    880830     * Set the detection type. Must be one of self::DETECTION_TYPE_MOBILE or
     
    891841            $type = self::DETECTION_TYPE_MOBILE;
    892842        }
    893 
    894843        if ($type !== self::DETECTION_TYPE_MOBILE && $type !== self::DETECTION_TYPE_EXTENDED) {
    895844            return;
    896845        }
    897 
    898846        $this->detectionType = $type;
    899847    }
    900 
    901848    public function getMatchingRegex()
    902849    {
    903850        return $this->matchingRegex;
    904851    }
    905 
    906852    public function getMatchesArray()
    907853    {
    908854        return $this->matchesArray;
    909855    }
    910 
    911856    /**
    912857     * Retrieve the list of known phone devices.
     
    918863        return self::$phoneDevices;
    919864    }
    920 
    921865    /**
    922866     * Retrieve the list of known tablet devices.
     
    928872        return self::$tabletDevices;
    929873    }
    930 
    931874    /**
    932875     * Alias for getBrowsers() method.
     
    938881        return self::getBrowsers();
    939882    }
    940 
    941883    /**
    942884     * Retrieve the list of known browsers. Specifically, the user agents.
     
    948890        return self::$browsers;
    949891    }
    950 
    951892    /**
    952893     * Retrieve the list of known utilities.
     
    958899        return self::$utilities;
    959900    }
    960 
    961901    /**
    962902     * Method gets the mobile detection rules. This method is used for the magic methods $detect->is*().
     
    969909    {
    970910        static $rules;
    971 
    972911        if (!$rules) {
    973912            $rules = array_merge(
     
    978917            );
    979918        }
    980 
    981919        return $rules;
    982 
    983     }
    984 
     920    }
    985921    /**
    986922     * Method gets the mobile detection rules + utilities.
     
    996932    {
    997933        static $rules;
    998 
    999934        if (!$rules) {
    1000935            // Merge all rules together.
     
    1007942            );
    1008943        }
    1009 
    1010944        return $rules;
    1011945    }
    1012 
    1013946    /**
    1014947     * Retrieve the current set of rules.
     
    1026959        }
    1027960    }
    1028 
    1029961    /**
    1030962     * Retrieve the list of mobile operating systems.
     
    1036968        return self::$operatingSystems;
    1037969    }
    1038 
    1039970    /**
    1040971     * Check the HTTP headers for signs of mobile.
     
    1046977    public function checkHttpHeadersForMobile()
    1047978    {
    1048 
    1049979        foreach ($this->getMobileHeaders() as $mobileHeader => $matchType) {
    1050980            if (isset($this->httpHeaders[$mobileHeader])) {
     
    1055985                        }
    1056986                    }
    1057 
    1058987                    return false;
    1059988                } else {
     
    1062991            }
    1063992        }
    1064 
    1065993        return false;
    1066 
    1067     }
    1068 
     994    }
    1069995    /**
    1070996     * Magic overloading method.
     
    10821008            throw new BadMethodCallException("No such method exists: $name");
    10831009        }
    1084 
    10851010        $this->setDetectionType(self::DETECTION_TYPE_MOBILE);
    1086 
    10871011        $key = substr($name, 2);
    1088 
    10891012        return $this->matchUAAgainstKey($key);
    10901013    }
    1091 
    10921014    /**
    10931015     * Find a detection rule that matches the current User-agent.
     
    11031025                continue;
    11041026            }
    1105 
    11061027            if ($this->match($_regex, $userAgent)) {
    11071028                return true;
    11081029            }
    11091030        }
    1110 
    11111031        return false;
    11121032    }
    1113 
    11141033    /**
    11151034     * Search for a certain key in the rules array.
     
    11261045        $key = strtolower($key);
    11271046        if (false === isset($this->cache[$key])) {
    1128 
    11291047            // change the keys to lower case
    11301048            $_rules = array_change_key_case($this->getRules());
    1131 
    11321049            if (false === empty($_rules[$key])) {
    11331050                $this->cache[$key] = $this->match($_rules[$key]);
    11341051            }
    1135 
    11361052            if (false === isset($this->cache[$key])) {
    11371053                $this->cache[$key] = false;
    11381054            }
    11391055        }
    1140 
    11411056        return $this->cache[$key];
    11421057    }
    1143 
    11441058    /**
    11451059     * Check if the device is mobile.
     
    11511065    public function isMobile($userAgent = null, $httpHeaders = null)
    11521066    {
    1153 
    11541067        if ($httpHeaders) {
    11551068            $this->setHttpHeaders($httpHeaders);
    11561069        }
    1157 
    11581070        if ($userAgent) {
    11591071            $this->setUserAgent($userAgent);
    11601072        }
    1161 
    11621073        // Check specifically for cloudfront headers if the useragent === 'Amazon CloudFront'
    11631074        if ($this->getUserAgent() === 'Amazon CloudFront') {
     
    11671078            }
    11681079        }
    1169 
    11701080        $this->setDetectionType(self::DETECTION_TYPE_MOBILE);
    1171 
    11721081        if ($this->checkHttpHeadersForMobile()) {
    11731082            return true;
     
    11751084            return $this->matchDetectionRulesAgainstUA();
    11761085        }
    1177 
    1178     }
    1179 
     1086    }
    11801087    /**
    11811088     * Check if the device is a tablet.
     
    11951102            }
    11961103        }
    1197 
    11981104        $this->setDetectionType(self::DETECTION_TYPE_MOBILE);
    1199 
    12001105        foreach (self::$tabletDevices as $_regex) {
    12011106            if ($this->match($_regex, $userAgent)) {
     
    12031108            }
    12041109        }
    1205 
    12061110        return false;
    12071111    }
    1208 
    12091112    /**
    12101113     * This method checks for a certain property in the
     
    12231126            $this->setHttpHeaders($httpHeaders);
    12241127        }
    1225 
    12261128        if ($userAgent) {
    12271129            $this->setUserAgent($userAgent);
    12281130        }
    1229 
    12301131        $this->setDetectionType(self::DETECTION_TYPE_EXTENDED);
    1231 
    12321132        return $this->matchUAAgainstKey($key);
    12331133    }
    1234 
    12351134    /**
    12361135     * Some detection rules are relative (not standard),
     
    12561155            $this->matchesArray = $matches;
    12571156        }
    1258 
    12591157        return $match;
    12601158    }
    1261 
    12621159    /**
    12631160     * Get the properties array.
     
    12691166        return self::$properties;
    12701167    }
    1271 
    12721168    /**
    12731169     * Prepare the version number.
     
    12831179        $ver = str_replace(array('_', ' ', '/'), '.', $ver);
    12841180        $arrVer = explode('.', $ver, 2);
    1285 
    12861181        if (isset($arrVer[1])) {
    12871182            $arrVer[1] = @str_replace('.', '', $arrVer[1]); // @todo: treat strings versions.
    12881183        }
    1289 
    12901184        return (float) implode('.', $arrVer);
    12911185    }
    1292 
    12931186    /**
    12941187     * Check the version of the given property in the User-Agent.
     
    13091202            return false;
    13101203        }
    1311 
    13121204        // set the $type to the default if we don't recognize the type
    13131205        if ($type !== self::VERSION_TYPE_STRING && $type !== self::VERSION_TYPE_FLOAT) {
    13141206            $type = self::VERSION_TYPE_STRING;
    13151207        }
    1316 
    13171208        $properties = self::getProperties();
    1318 
    13191209        // Check if the property exists in the properties array.
    13201210        if (true === isset($properties[$propertyName])) {
    1321 
    13221211            // Prepare the pattern to be matched.
    13231212            // Make sure we always deal with an array (string is converted).
    13241213            $properties[$propertyName] = (array) $properties[$propertyName];
    1325 
    13261214            foreach ($properties[$propertyName] as $propertyMatchString) {
    1327 
    13281215                $propertyPattern = str_replace('[VER]', self::VER, $propertyMatchString);
    1329 
    13301216                // Identify and extract the version.
    13311217                preg_match(sprintf('#%s#is', $propertyPattern), $this->userAgent, $match);
    1332 
    13331218                if (false === empty($match[1])) {
    13341219                    $version = ($type == self::VERSION_TYPE_FLOAT ? $this->prepareVersionNo($match[1]) : $match[1]);
    1335 
    13361220                    return $version;
    13371221                }
    1338 
    13391222            }
    1340 
    1341         }
    1342 
     1223        }
    13431224        return false;
    13441225    }
    1345 
    13461226    /**
    13471227     * Retrieve the mobile grading, using self::MOBILE_GRADE_* constants.
     
    13521232    {
    13531233        $isMobile = $this->isMobile();
    1354 
    13551234        if (
    13561235            // 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)
     
    13581237            $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT) >= 4.3 ||
    13591238            $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT) >= 4.3 ||
    1360 
    13611239            // 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)
    13621240            // Android 3.1 (Honeycomb)  - Tested on the Samsung Galaxy Tab 10.1 and Motorola XOOM
     
    13641242            // Android 4.1 (Jelly Bean)  - Tested on a Galaxy Nexus and Galaxy 7
    13651243            ( $this->version('Android', self::VERSION_TYPE_FLOAT)>2.1 && $this->is('Webkit') ) ||
    1366 
    13671244            // 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)
    13681245            $this->version('Windows Phone OS', self::VERSION_TYPE_FLOAT) >= 7.5 ||
    1369 
    13701246            // Tested on the Torch 9800 (6) and Style 9670 (6), BlackBerry® Torch 9810 (7), BlackBerry Z10 (10)
    13711247            $this->is('BlackBerry') && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) >= 6.0 ||
    13721248            // Blackberry Playbook (1.0-2.0) - Tested on PlayBook
    13731249            $this->match('Playbook.*Tablet') ||
    1374 
    13751250            // Palm WebOS (1.4-3.0) - Tested on the Palm Pixi (1.4), Pre (1.4), Pre 2 (2.0), HP TouchPad (3.0)
    13761251            ( $this->version('webOS', self::VERSION_TYPE_FLOAT) >= 1.4 && $this->match('Palm|Pre|Pixi') ) ||
    13771252            // Palm WebOS 3.0  - Tested on HP TouchPad
    13781253            $this->match('hp.*TouchPad') ||
    1379 
    13801254            // Firefox Mobile 18 - Tested on Android 2.3 and 4.1 devices
    13811255            ( $this->is('Firefox') && $this->version('Firefox', self::VERSION_TYPE_FLOAT) >= 18 ) ||
    1382 
    13831256            // Chrome for Android - Tested on Android 4.0, 4.1 device
    13841257            ( $this->is('Chrome') && $this->is('AndroidOS') && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 4.0 ) ||
    1385 
    13861258            // Skyfire 4.1 - Tested on Android 2.3 device
    13871259            ( $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 
    13891260            // Opera Mobile 11.5-12: Tested on Android 2.3
    13901261            ( $this->is('Opera') && $this->version('Opera Mobi', self::VERSION_TYPE_FLOAT) >= 11.5 && $this->is('AndroidOS') ) ||
    1391 
    13921262            // Meego 1.2 - Tested on Nokia 950 and N9
    13931263            $this->is('MeeGoOS') ||
    1394 
    13951264            // Tizen (pre-release) - Tested on early hardware
    13961265            $this->is('Tizen') ||
    1397 
    13981266            // Samsung Bada 2.0 - Tested on a Samsung Wave 3, Dolphin browser
    13991267            // @todo: more tests here!
    14001268            $this->is('Dolfin') && $this->version('Bada', self::VERSION_TYPE_FLOAT) >= 2.0 ||
    1401 
    14021269            // UC Browser - Tested on Android 2.3 device
    14031270            ( ($this->is('UC Browser') || $this->is('Dolfin')) && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3 ) ||
    1404 
    14051271            // Kindle 3 and Fire  - Tested on the built-in WebKit browser for each
    14061272            ( $this->match('Kindle Fire') ||
    14071273            $this->is('Kindle') && $this->version('Kindle', self::VERSION_TYPE_FLOAT) >= 3.0 ) ||
    1408 
    14091274            // Nook Color 1.4.1 - Tested on original Nook Color, not Nook Tablet
    14101275            $this->is('AndroidOS') && $this->is('NookTablet') ||
    1411 
    14121276            // Chrome Desktop 16-24 - Tested on OS X 10.7 and Windows 7
    14131277            $this->version('Chrome', self::VERSION_TYPE_FLOAT) >= 16 && !$isMobile ||
    1414 
    14151278            // Safari Desktop 5-6 - Tested on OS X 10.7 and Windows 7
    14161279            $this->version('Safari', self::VERSION_TYPE_FLOAT) >= 5.0 && !$isMobile ||
    1417 
    14181280            // Firefox Desktop 10-18 - Tested on OS X 10.7 and Windows 7
    14191281            $this->version('Firefox', self::VERSION_TYPE_FLOAT) >= 10.0 && !$isMobile ||
    1420 
    14211282            // Internet Explorer 7-9 - Tested on Windows XP, Vista and 7
    14221283            $this->version('IE', self::VERSION_TYPE_FLOAT) >= 7.0 && !$isMobile ||
    1423 
    14241284            // Opera Desktop 10-12 - Tested on OS X 10.7 and Windows 7
    14251285            $this->version('Opera', self::VERSION_TYPE_FLOAT) >= 10 && !$isMobile
     
    14271287            return self::MOBILE_GRADE_A;
    14281288        }
    1429 
    14301289        if (
    14311290            $this->is('iOS') && $this->version('iPad', self::VERSION_TYPE_FLOAT)<4.3 ||
    14321291            $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT)<4.3 ||
    14331292            $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT)<4.3 ||
    1434 
    14351293            // Blackberry 5.0: Tested on the Storm 2 9550, Bold 9770
    14361294            $this->is('Blackberry') && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) >= 5 && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT)<6 ||
    1437 
    14381295            //Opera Mini (5.0-6.5) - Tested on iOS 3.2/4.3 and Android 2.3
    14391296            ($this->version('Opera Mini', self::VERSION_TYPE_FLOAT) >= 5.0 && $this->version('Opera Mini', self::VERSION_TYPE_FLOAT) <= 7.0 &&
    14401297            ($this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3 || $this->is('iOS')) ) ||
    1441 
    14421298            // Nokia Symbian^3 - Tested on Nokia N8 (Symbian^3), C7 (Symbian^3), also works on N97 (Symbian^1)
    14431299            $this->match('NokiaN8|NokiaC7|N97.*Series60|Symbian/3') ||
    1444 
    14451300            // @todo: report this (tested on Nokia N71)
    14461301            $this->version('Opera Mobi', self::VERSION_TYPE_FLOAT) >= 11 && $this->is('SymbianOS')
     
    14481303            return self::MOBILE_GRADE_B;
    14491304        }
    1450 
    14511305        if (
    14521306            // Blackberry 4.x - Tested on the Curve 8330
     
    14541308            // Windows Mobile - Tested on the HTC Leo (WinMo 5.2)
    14551309            $this->match('MSIEMobile|Windows CE.*Mobile') || $this->version('Windows Mobile', self::VERSION_TYPE_FLOAT) <= 5.2 ||
    1456 
    14571310            // Tested on original iPhone (3.1), iPhone 3 (3.2)
    14581311            $this->is('iOS') && $this->version('iPad', self::VERSION_TYPE_FLOAT) <= 3.2 ||
    14591312            $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT) <= 3.2 ||
    14601313            $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT) <= 3.2 ||
    1461 
    14621314            // Internet Explorer 7 and older - Tested on Windows XP
    14631315            $this->version('IE', self::VERSION_TYPE_FLOAT) <= 7.0 && !$isMobile
     
    14651317            return self::MOBILE_GRADE_C;
    14661318        }
    1467 
    14681319        // All older smartphone platforms and featurephones - Any device that doesn't support media queries
    14691320        // will receive the basic, C grade experience.
  • unreal-themes-switching/trunk/readme.txt

    r1872377 r2220600  
    1 === Unreal themes switching ===
     1=== Unreal Themes switching ===
    22
    33Contributors: Roman Bondarenko
    44Tags: switch theme, themes, mobile, tablet, desktop, theme, active theme, iphone, ipad, android, blackberry, windows, device, smartphone,admin,plugin,posts,post,page
    55Requires at least: 3.4.0
    6 Tested up to: 4.9
     6Tested up to: 5.3.2
    77Stable tag: trunk
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1010
    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 type
     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 type
    1212
    1313
     
    32323. Type the plugin name "Theme Switch in Mobile and Desktop"
    33334. Finally, install and activate the plugin
     34
     35== Changelog  ==
     36
     371. update library
     382. fixed code
  • unreal-themes-switching/trunk/settings.php

    r1872377 r2220600  
    55 * Create page options
    66 */
    7 add_action('admin_menu', 'unreal_add_plugin_page');
     7add_action('admin_menu', 'ut_add_plugin_page');
    88
    9 function unreal_add_plugin_page(){
     9function ut_add_plugin_page(){
    1010
    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' );
    1212}
    1313
    14 function unreal_options_page_output(){
     14function ut_options_page_output(){
    1515    ?>
    1616    <div class="wrap">
     
    1818        <form action="options.php" method="POST">
    1919            <?php
    20                 settings_fields( 'unreal_group' );     
    21                 do_settings_sections( 'unreal_page' );
     20                settings_fields( 'ut_group' );     
     21                do_settings_sections( 'ut_page' );
    2222                submit_button();
    2323            ?>
     
    3131 * Register settings
    3232 */
    33 add_action('admin_init', 'unreal_plugin_settings');
     33add_action('admin_init', 'ut_plugin_settings');
    3434
    35 function unreal_plugin_settings(){
     35function ut_plugin_settings(){
    3636
    37     register_setting( 'unreal_group', 'unreal_option', 'sanitize_callback' );
     37    register_setting( 'ut_group', 'ut_option', 'sanitize_callback' );
    3838
    39     add_settings_section( 'unreal_id', '', '', 'unreal_page' );
     39    add_settings_section( 'ut_id', '', '', 'ut_page' );
    4040
    41     add_settings_field('unreal_desktop', __('Active Theme'), 'unreal_active_theme', 'unreal_page', 'unreal_id' );
    42     add_settings_field('unreal_tablet', __('Theme for Tablet'), 'unreal_field_tablet', 'unreal_page', 'unreal_id' );
    43     add_settings_field('unreal_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' );
    4444}
     45
     46
     47/**
     48 * Add a settings link to your WordPress plugin on the plugin listing page.
     49 */
     50function 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}
     66add_filter( 'plugin_action_links_unreal-themes-switching/unreal-themes-switching.php', 'ut_add_settings_link' );
    4567
    4668
     
    4870 * Desktop
    4971 */
    50 function unreal_active_theme(){
     72function ut_active_theme(){
    5173
    5274    $current_theme      = wp_get_theme();
     
    6284 * Tablet
    6385 */
    64 function unreal_field_tablet(){
     86function ut_field_tablet(){
    6587
    66     $val    = get_option('unreal_option');
     88    $val    = get_option('ut_option');
    6789    $val    = $val ? $val['tablet'] : null;
    6890    $themes = wp_get_themes(); ?>
    6991
    70     <select name="unreal_option[tablet]">
     92    <select name="ut_option[tablet]">
    7193        <option value="0"><?php echo __('- Select -'); ?></option>
    7294        <?php foreach( (array)$themes as $theme ): ?>
     
    88110 * Phone
    89111 */
    90 function unreal_field_phone(){
     112function ut_field_phone(){
    91113
    92     $val    = get_option('unreal_option');
     114    $val    = get_option('ut_option');
    93115    $val    = $val ? $val['phone'] : null;
    94116    $themes = wp_get_themes(); ?>
    95117
    96     <select name="unreal_option[phone]">
     118    <select name="ut_option[phone]">
    97119        <option value="0"><?php echo __('- Select -'); ?></option>
    98120        <?php foreach( (array)$themes as $theme ): ?>
  • unreal-themes-switching/trunk/uninstall.php

    r1872377 r2220600  
    11<?php
    22
    3 if (!defined('ABSPATH') || !defined('WP_UNINSTALL_PLUGIN')) {
    4      exit();  // silence is golden
     3if ( ! defined('ABSPATH') || ! defined('WP_UNINSTALL_PLUGIN') ) {
     4    exit(); 
    55}
    66   
    7 delete_option('unreal_option');
     7delete_option('ut_option');
  • unreal-themes-switching/trunk/unreal-themes-switching.php

    r1872377 r2220600  
    22/**
    33 * Plugin Name: Unreal themes switching
    4  * Plugin URI: https://wordpress.org/plugins/
     4 * Plugin URI: https://wordpress.org/plugins/unreal-themes-switching/
    55 * 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.0
     6 * Version: 1.2
    77 * Author: Roman Bondarenko
    8  * Author URI: http://romchyk16.xyz/
     8 * Author URI: https://unrealthemes.ru/
    99 */
    1010 
Note: See TracChangeset for help on using the changeset viewer.