WordPress.org

Making WordPress.org


Ignore:
Timestamp:
09/29/2017 06:47:11 PM (2 years ago)
Author:
coffee2code
Message:

Browse Happy API: Add support for Nokia Browser.

File:
1 edited

Legend:

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

    r5977 r5979  
    5959
    6060    preg_match_all(
    61         '%(?P<name>Opera Mini|Opera|OPR|Edge|Trident|Camino|Kindle|Firefox|(?:Mobile )?Safari|MSIE|RockMelt|AppleWebKit|Chrome|IEMobile|Version)(?:[/ ])(?P<version>[0-9.]+)%im',
     61        '%(?P<name>Opera Mini|Opera|OPR|Edge|Trident|Camino|Kindle|Firefox|(?:Mobile )?Safari|NokiaBrowser|MSIE|RockMelt|AppleWebKit|Chrome|IEMobile|Version)(?:[/ ])(?P<version>[0-9.]+)%im',
    6262        $user_agent,
    6363        $result,
     
    8787        }
    8888        $data['version'] = $result['version'][ $key ];
     89    }
     90    // Nokia Browser
     91    elseif ( $key = array_search( 'NokiaBrowser', $result['name'] ) ) {
     92        $data['name']     = 'Nokia Browser';
     93        $data['version']  = $result['version'][ $key ];
     94        $data['mobile']   = true;
    8995    } elseif ( 'AppleWebKit' == $result['name'][0] ) {
    9096        if ( $key = array_search( 'Edge', $result['name'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.