Making WordPress.org


Ignore:
Timestamp:
09/18/2017 08:21:04 PM (7 years ago)
Author:
coffee2code
Message:

Browse Happy API: Add missing docblocks and improve the existing ones.

File:
1 edited

Legend:

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

    r5934 r5935  
    77
    88/**
    9 * Parses a user agent string into its important parts
    10 *
    11 * @param string $user_agent
    12 *
    13 * @return array containing platform, name, and version
    14 */
     9 * Parses a user agent string into its important parts.
     10 *
     11 * @param string $user_agent The user agent string for a browser.
     12 * @return array {
     13 *     Array containing data based on the parsing of the user agent.
     14 *
     15 *     @type string $platform        The platform running the browser.
     16 *     @type string $name            The name of the browser.
     17 *     @type string $version         The reported version of the browser.
     18 *     @type string $update_url      The URL to obtain the update for the browser.
     19 *     @type string $img_src         The non-HTTPS URL for the browser's logo image.
     20 *     @type string $img_src_ssl     The HTTPS URL for the browser's logo image.
     21 *     @type string $current_version The current latest version of the browser.
     22 *     @type bool   $upgrade         Is there an update available for the browser?
     23 *     @type bool   $insecure        Is the browser insecure?
     24 * }
     25 */
    1526function browsehappy_parse_user_agent( $user_agent ) {
    1627    $data = array();
     
    104115}
    105116
     117/**
     118 * Returns the current version for the given browser.
     119 *
     120 * @param string $name The name of the browser.
     121 * @return string      The version for the browser or an empty string if an
     122 *                     unknown browser.
     123 */
    106124function get_browser_version_from_name( $name ) {
    107125    $versions = get_browser_current_versions();
Note: See TracChangeset for help on using the changeset viewer.