Make WordPress Core

Changeset 36114


Ignore:
Timestamp:
12/28/2015 08:09:58 PM (8 years ago)
Author:
DrewAPicture
Message:

Docs: Hash notate properties and defaults for the benefit of $args parameter documentation for WP_Customize_Control::__construct().

See #32246.

File:
1 edited

Legend:

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

    r35389 r36114  
    134134     * Constructor.
    135135     *
    136      * Supplied $args override class property defaults.
    137      *
    138      * If $args['settings'] is not defined, use the $id as the setting ID.
     136     * Supplied `$args` override class property defaults.
     137     *
     138     * If `$args['settings']` is not defined, use the $id as the setting ID.
    139139     *
    140140     * @since 3.4.0
     
    142142     * @param WP_Customize_Manager $manager Customizer bootstrap instance.
    143143     * @param string               $id      Control ID.
    144      * @param array                $args    Optional. Arguments to override class property defaults.
     144     * @param array                $args    {
     145     *     Optional. Arguments to override class property defaults.
     146     *
     147     *     @type int                  $instance_number Order in which this instance was created in relation
     148     *                                                 to other instances.
     149     *     @type WP_Customize_Manager $manager         Customizer bootstrap instance.
     150     *     @type string               $id              Control ID.
     151     *     @type array                $settings        All settings tied to the control. If undefined, `$id` will
     152     *                                                 be used.
     153     *     @type string               $setting         The primary setting for the control (if there is one).
     154     *                                                 Default 'default'.
     155     *     @type int                  $priority        Order priority to load the control. Default 10.
     156     *     @type string               $section         Section the control belongs to. Default empty.
     157     *     @type string               $label           Label for the control. Default empty.
     158     *     @type string               $description     Description for the control. Default empty.
     159     *     @type array                $choices         List of choices for 'radio' or 'select' type controls, where
     160     *                                                 values are the keys, and labels are the values.
     161     *                                                 Default empty array.
     162     *     @type array                $input_attrs     List of custom input attributes for control output, where
     163     *                                                 attribute names are the keys and values are the values. Not
     164     *                                                 used for 'checkbox', 'radio', 'select', 'textarea', or
     165     *                                                 'dropdown-pages' control types. Default empty array.
     166     *     @type array                $json            Deprecated. Use {@see WP_Customize_Control->json()} instead.
     167     *     @type string               $type            Control type. Core controls include 'text', 'checkbox',
     168     *                                                 'textarea', 'radio', 'select', and 'dropdown-pages'. Additional
     169     *                                                 input types such as 'email', 'url', 'number', 'hidden', and
     170     *                                                 'date' are supported implicitly. Default 'text'.
     171     * }
    145172     */
    146173    public function __construct( $manager, $id, $args = array() ) {
Note: See TracChangeset for help on using the changeset viewer.