Making WordPress.org


Ignore:
Timestamp:
09/18/2017 07:53:25 PM (8 years ago)
Author:
coffee2code
Message:

Browse Happy API: Whitespace changes.

  • Changes leading spaces to tabs
  • Adds braces to single-line conditionals
  • Aligns associative array elements
  • Removes trailing spaces
File:
1 edited

Legend:

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

    r1 r5934  
    3030    $data = array(
    3131        'Internet Explorer' => (object) array(
    32             'name' => 'Internet Explorer',
    33             'wikipedia' => 'Internet_Explorer',
    34             'normalized' => 1, // just first number
    35             'url' => 'http://www.microsoft.com/windows/internet-explorer/',
    36             'img_src' => $http . 'ie.png',
     32            'name'        => 'Internet Explorer',
     33            'wikipedia'   => 'Internet_Explorer',
     34            'normalized'  => 1, // just first number
     35            'url'         => 'http://www.microsoft.com/windows/internet-explorer/',
     36            'img_src'     => $http . 'ie.png',
    3737            'img_src_ssl' => $https . 'ie.png',
    3838        ),
    3939        'Firefox' => (object) array(
    40             'name' => 'Mozilla Firefox',
    41             'wikipedia' => 'Firefox',
    42             'normalized' => 1.5, // include second number if non-zero
    43             'url' => 'http://www.firefox.com/',
    44             'img_src' => $http . 'firefox.png',
     40            'name'        => 'Mozilla Firefox',
     41            'wikipedia'   => 'Firefox',
     42            'normalized'  => 1.5, // include second number if non-zero
     43            'url'         => 'http://www.firefox.com/',
     44            'img_src'     => $http . 'firefox.png',
    4545            'img_src_ssl' => $https . 'firefox.png',
    4646        ),
    4747        'Safari' => (object) array(
    48             'name' => 'Safari',
    49             'wikipedia' => 'Safari',
    50             'normalized' => 1.5, // include second number if non-zero
    51             'url' => 'http://www.apple.com/safari/',
    52             'img_src' => $http . 'safari.png',
     48            'name'        => 'Safari',
     49            'wikipedia'   => 'Safari',
     50            'normalized'  => 1.5, // include second number if non-zero
     51            'url'         => 'http://www.apple.com/safari/',
     52            'img_src'     => $http . 'safari.png',
    5353            'img_src_ssl' => $https . 'safari.png',
    5454        ),
    5555        'Opera' => (object) array(
    56             'name' => 'Opera',
    57             'wikipedia' => 'Opera',
    58             'normalized' => 2, // include second number
    59             'url' => 'http://www.opera.com/',
    60             'img_src' => $http . 'opera.png',
     56            'name'        => 'Opera',
     57            'wikipedia'   => 'Opera',
     58            'normalized'  => 2, // include second number
     59            'url'         => 'http://www.opera.com/',
     60            'img_src'     => $http . 'opera.png',
    6161            'img_src_ssl' => $https . 'opera.png',
    6262        ),
    6363        'Chrome' => (object) array(
    64             'name' => 'Google Chrome',
    65             'wikipedia' => 'Google_Chrome',
    66             'normalized' => 1, // just first number
    67             'url' => 'http://www.google.com/chrome',
    68             'img_src' => $http . 'chrome.png',
     64            'name'        => 'Google Chrome',
     65            'wikipedia'   => 'Google_Chrome',
     66            'normalized'  => 1, // just first number
     67            'url'         => 'http://www.google.com/chrome',
     68            'img_src'     => $http . 'chrome.png',
    6969            'img_src_ssl' => $https . 'chrome.png',
    7070        ),
    7171    );
    7272
    73     if ( false === $browser )
     73    if ( false === $browser ) {
    7474        return $data;
     75    }
    7576
    76     if ( ! isset( $data[ $browser ] ) )
     77    if ( ! isset( $data[ $browser ] ) ) {
    7778        return false;
     79    }
    7880
    7981    return $data[ $browser ];
Note: See TracChangeset for help on using the changeset viewer.