WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/25/2020 04:39:36 PM (12 months ago)
Author:
SergeyBiryukov
Message:

Docs: Add a reference to WP_Customize_Control::__construct() for information on accepted arguments in WP_Customize_Manager::add_control().

Synchronize the documentation between two places, use WP_Customize_Control::__construct() as the canonical source.

Props hAmpzter, marekdedic, SergeyBiryukov.
Fixes #48343.

File:
1 edited

Legend:

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

    r47233 r47364  
    39943994     *
    39953995     * @param WP_Customize_Control|string $id   Customize Control object, or ID.
    3996      * @param array                       $args {
    3997      *  Optional. Array of properties for the new Control object. Default empty array.
    3998      *
    3999      *  @type array        $settings              All settings tied to the control. If undefined, defaults to `$setting`.
    4000      *                                            IDs in the array correspond to the ID of a registered `WP_Customize_Setting`.
    4001      *  @type string       $setting               The primary setting for the control (if there is one). Default is 'default'.
    4002      *  @type string       $capability            Capability required to use this control. Normally derived from `$settings`.
    4003      *  @type int          $priority              Order priority to load the control. Default 10.
    4004      *  @type string       $section               The section this control belongs to. Default empty.
    4005      *  @type string       $label                 Label for the control. Default empty.
    4006      *  @type string       $description           Description for the control. Default empty.
    4007      *  @type array        $choices               List of choices for 'radio' or 'select' type controls, where values
    4008      *                                            are the keys, and labels are the values. Default empty array.
    4009      *  @type array        $input_attrs           List of custom input attributes for control output, where attribute
    4010      *                                            names are the keys and values are the values. Default empty array.
    4011      *  @type bool         $allow_addition        Show UI for adding new content, currently only used for the
    4012      *                                            dropdown-pages control. Default false.
    4013      *  @type string       $type                  The type of the control. Default 'text'.
    4014      *  @type callback     $active_callback       Active callback.
    4015      * }
     3996     * @param array                       $args Optional. Array of properties for the new Control object.
     3997     *                                          See WP_Customize_Control::__construct() for information
     3998     *                                          on accepted arguments. Default empty array.
    40163999     * @return WP_Customize_Control             The instance of the control that was added.
    40174000     */
Note: See TracChangeset for help on using the changeset viewer.