Make WordPress Core

Changeset 29107


Ignore:
Timestamp:
07/11/2014 10:49:50 PM (12 years ago)
Author:
DrewAPicture
Message:

Convert default arguments documentation for WP_Http_Cookie::construct() into a hash notation.

Props coffee2code for the initial patch.
See #28841.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-http.php

    r28865 r29107  
    17711771         * or a header string detailing it.
    17721772         *
    1773          * If it's an array, it should include the following elements:
    1774          * <ol>
    1775          * <li>Name</li>
    1776          * <li>Value - should NOT be urlencoded already.</li>
    1777          * <li>Expires - (optional) String or int (UNIX timestamp).</li>
    1778          * <li>Path (optional)</li>
    1779          * <li>Domain (optional)</li>
    1780          * <li>Port (optional)</li>
    1781          * </ol>
    1782          *
     1773         * @since 2.8.0
    17831774         * @access public
    1784          * @since 2.8.0
    1785          *
    1786          * @param string|array $data Raw cookie data.
    1787          * @param string $requested_url The URL which the cookie was set on, used for default 'domain' and 'port' values
     1775         *
     1776         * @param string|array $data {
     1777         *     Raw cookie data as header string or data array.
     1778         *
     1779         *     @type string     $name    Cookie name.
     1780         *     @type mixed      $value   Value. Should NOT already be urlencoded.
     1781         *     @type string|int $expires Optional. Unix timestamp or formatted date. Default null.
     1782         *     @type string     $path    Optional. Path. Default '/'.
     1783         *     @type string     $domain  Optional. Domain. Default host of parsed $requested_url.
     1784         *     @type int        $port    Optional. Port. Default null.
     1785         * }
     1786         * @param string       $requested_url The URL which the cookie was set on, used for default $domain
     1787         *                                    and $port values.
    17881788         */
    17891789        public function __construct( $data, $requested_url = '' ) {
Note: See TracChangeset for help on using the changeset viewer.