WordPress.org

Making WordPress.org


Ignore:
Timestamp:
09/28/2017 10:31:36 PM (2 years ago)
Author:
coffee2code
Message:

Browse Happy API: Add support for Microsoft Edge.

File:
1 edited

Legend:

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

    r5971 r5974  
    5959
    6060    preg_match_all(
    61         '%(?P<name>Opera Mini|Opera|OPR|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|MSIE|RockMelt|AppleWebKit|Chrome|IEMobile|Version)(?:[/ ])(?P<version>[0-9.]+)%im',
    6262        $user_agent,
    6363        $result,
     
    8888        $data['version'] = $result['version'][ $key ];
    8989    } elseif ( 'AppleWebKit' == $result['name'][0] ) {
    90         if ( $key = array_search( 'Mobile Safari', $result['name'] ) ) {
     90        if ( $key = array_search( 'Edge', $result['name'] ) ) {
     91            $data['name'] = 'Microsoft Edge';
     92        } elseif ( $key = array_search( 'Mobile Safari', $result['name'] ) ) {
    9193            $data['name'] = 'Mobile Safari';
    9294        // } elseif ( ( 'Android' == $data['platform'] && !($key = 0) ) || $key = array_search( 'Chrome', $result['name'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.