Make WordPress Core

Changeset 47386


Ignore:
Timestamp:
02/27/2020 08:27:45 PM (7 years ago)
Author:
SergeyBiryukov
Message:

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

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

Props amolv, marekdedic.
Fixes #48346.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r47385 r47386  
    39003900         * @since 4.5.0 Return added WP_Customize_Section instance.
    39013901         *
     3902         * @see WP_Customize_Section::__construct()
     3903         *
    39023904         * @param WP_Customize_Section|string $id   Customize Section object, or Section ID.
    3903          * @param array                     $args {
    3904          *  Optional. Array of properties for the new Section object. Default empty array.
    3905          *
    3906          *     @type int             $priority           Priority of the section, defining the display order
    3907          *                                               of panels and sections. Default 160.
    3908          *     @type string          $panel              The panel this section belongs to (if any).
    3909          *                                               Default empty.
    3910          *     @type string          $capability         Capability required for the section.
    3911          *                                               Default 'edit_theme_options'
    3912          *     @type string|string[] $theme_supports     Theme features required to support the section.
    3913          *     @type string          $title              Title of the section to show in UI.
    3914          *     @type string          $description        Description to show in the UI.
    3915          *     @type string          $type               Type of the section.
    3916          *     @type callable        $active_callback    Active callback.
    3917          *     @type bool            $description_hidden Hide the description behind a help icon,
    3918          *                                               instead of inline above the first control.
    3919          *                                               Default false.
    3920          * }
     3905         * @param array                       $args Optional. Array of properties for the new Section object.
     3906         *                                          See WP_Customize_Section::__construct() for information
     3907         *                                          on accepted arguments. Default empty array.
    39213908         * @return WP_Customize_Section The instance of the section that was added.
    39223909         */
  • trunk/src/wp-includes/class-wp-customize-section.php

    r47385 r47386  
    151151         * @param WP_Customize_Manager $manager Customizer bootstrap instance.
    152152         * @param string               $id      A specific ID of the section.
    153          * @param array                $args    Section arguments.
     153         * @param array                $args    {
     154         *     Optional. Array of properties for the new Section object. Default empty array.
     155         *
     156         *     @type int             $priority           Priority of the section, defining the display order
     157         *                                               of panels and sections. Default 160.
     158         *     @type string          $panel              The panel this section belongs to (if any).
     159         *                                               Default empty.
     160         *     @type string          $capability         Capability required for the section.
     161         *                                               Default 'edit_theme_options'
     162         *     @type string|string[] $theme_supports     Theme features required to support the section.
     163         *     @type string          $title              Title of the section to show in UI.
     164         *     @type string          $description        Description to show in the UI.
     165         *     @type string          $type               Type of the section.
     166         *     @type callable        $active_callback    Active callback.
     167         *     @type bool            $description_hidden Hide the description behind a help icon,
     168         *                                               instead of inline above the first control.
     169         *                                               Default false.
     170         * }
    154171         */
    155172        public function __construct( $manager, $id, $args = array() ) {
Note: See TracChangeset for help on using the changeset viewer.