WordPress.org

Making WordPress.org


Ignore:
Timestamp:
10/02/2017 08:43:04 PM (2 years ago)
Author:
coffee2code
Message:

Browse Happy API: Add support for QQ Browser.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0/parse.php

    r5994 r5995  
    7676
    7777    preg_match_all(
    78         '%(?P<name>Opera Mini|Opera|OPR|Edge|UCBrowser|UCWEB|Trident|Silk|Camino|Kindle|Firefox|SamsungBrowser|(?:Mobile )?Safari|NokiaBrowser|MSIE|RockMelt|AppleWebKit|Chrome|IEMobile|Version)(?:[/ ])(?P<version>[0-9.]+)%im',
     78        '%(?P<name>Opera Mini|Opera|OPR|Edge|UCBrowser|UCWEB|QQBrowser|Trident|Silk|Camino|Kindle|Firefox|SamsungBrowser|(?:Mobile )?Safari|NokiaBrowser|MSIE|RockMelt|AppleWebKit|Chrome|IEMobile|Version)(?:[/ ])(?P<version>[0-9.]+)%im',
    7979        $user_agent,
    8080        $result,
     
    120120    ) {
    121121        $data['name']     = 'UC Browser';
     122        $data['version']  = $result['version'][ $key ];
     123        $version          = '';
     124    }
     125    // QQ Browser
     126    elseif ( false !== ( $key = array_search( 'QQBrowser', $result['name'] ) ) ) {
     127        $data['name']     = 'QQ Browser';
    122128        $data['version']  = $result['version'][ $key ];
    123129        $version          = '';
Note: See TracChangeset for help on using the changeset viewer.