Making WordPress.org


Ignore:
Timestamp:
10/11/2017 03:54:53 PM (7 years ago)
Author:
coffee2code
Message:

Browse Happy API: Add support for SeaMonkey.

File:
1 edited

Legend:

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

    r6017 r6018  
    5151    // Find tokens of interest in user-agent string.
    5252    preg_match_all(
    53         '%(?P<name>Opera Mini|Opera|OPR|Edge|UCBrowser|UCWEB|QQBrowser|SymbianOS|Symbian|S40OviBrowser|Trident|Silk|Konqueror|PaleMoon|Camino|Kindle|Firefox|SamsungBrowser|(?:Mobile )?Safari|NokiaBrowser|MSIE|RockMelt|AppleWebKit|Chrome|IEMobile|Version)(?:[/ ])(?P<version>[0-9.]+)%im',
     53        '%(?P<name>Opera Mini|Opera|OPR|Edge|UCBrowser|UCWEB|QQBrowser|SymbianOS|Symbian|S40OviBrowser|Trident|Silk|Konqueror|PaleMoon|SeaMonkey|Camino|Kindle|Firefox|SamsungBrowser|(?:Mobile )?Safari|NokiaBrowser|MSIE|RockMelt|AppleWebKit|Chrome|IEMobile|Version)(?:[/ ])(?P<version>[0-9.]+)%im',
    5454        $user_agent,
    5555        $result,
     
    179179    elseif ( false !== ( $key = array_search( 'PaleMoon', $result['name'] ) ) ) {
    180180        $data['name']     = 'Pale Moon';
     181        $data['version']  = $result['version'][ $key ];
     182    }
     183    // SeaMonkey
     184    elseif ( false !== ( $key = array_search( 'SeaMonkey', $result['name'] ) ) ) {
     185        $data['name']     = 'SeaMonkey';
    181186        $data['version']  = $result['version'][ $key ];
    182187    }
Note: See TracChangeset for help on using the changeset viewer.