Make WordPress Core

Changeset 47387


Ignore:
Timestamp:
02/27/2020 08:34:49 PM (6 years ago)
Author:
SergeyBiryukov
Message:

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

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

Props iaaxpage, marekdedic.
Fixes #48344.

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

Legend:

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

    r47386 r47387  
    38023802         * @since 4.5.0 Return added WP_Customize_Panel instance.
    38033803         *
    3804          * @param WP_Customize_Panel|string $id   Customize Panel object, or Panel ID.
    3805          * @param array                     $args {
    3806          *     Optional. Array of properties for the new Panel object. Default empty array.
    3807          *
    3808          *     @type int             $priority        Priority of the panel, defining the display order
    3809          *                                            of panels and sections. Default 160.
    3810          *     @type string          $capability      Capability required for the panel.
    3811          *                                            Default `edit_theme_options`.
    3812          *     @type string|string[] $theme_supports  Theme features required to support the panel.
    3813          *     @type string          $title           Title of the panel to show in UI.
    3814          *     @type string          $description     Description to show in the UI.
    3815          *     @type string          $type            Type of the panel.
    3816          *     @type callable        $active_callback Active callback.
    3817          * }
     3804         * @see WP_Customize_Panel::__construct()
     3805         *
     3806         * @param WP_Customize_Panel|string $id   Customize Panel object, or ID.
     3807         * @param array                     $args Optional. Array of properties for the new Panel object.
     3808         *                                        See WP_Customize_Panel::__construct() for information
     3809         *                                        on accepted arguments. Default empty array.
    38183810         * @return WP_Customize_Panel The instance of the panel that was added.
    38193811         */
     
    39023894         * @see WP_Customize_Section::__construct()
    39033895         *
    3904          * @param WP_Customize_Section|string $id   Customize Section object, or Section ID.
     3896         * @param WP_Customize_Section|string $id   Customize Section object, or ID.
    39053897         * @param array                       $args Optional. Array of properties for the new Section object.
    39063898         *                                          See WP_Customize_Section::__construct() for information
  • trunk/src/wp-includes/class-wp-customize-panel.php

    r47385 r47387  
    140140         * @param WP_Customize_Manager $manager Customizer bootstrap instance.
    141141         * @param string               $id      A specific ID for the panel.
    142          * @param array                $args    Panel arguments.
     142         * @param array                $args    {
     143         *     Optional. Array of properties for the new Panel object. Default empty array.
     144         *
     145         *     @type int             $priority        Priority of the panel, defining the display order
     146         *                                            of panels and sections. Default 160.
     147         *     @type string          $capability      Capability required for the panel.
     148         *                                            Default `edit_theme_options`.
     149         *     @type string|string[] $theme_supports  Theme features required to support the panel.
     150         *     @type string          $title           Title of the panel to show in UI.
     151         *     @type string          $description     Description to show in the UI.
     152         *     @type string          $type            Type of the panel.
     153         *     @type callable        $active_callback Active callback.
     154         * }
    143155         */
    144156        public function __construct( $manager, $id, $args = array() ) {
Note: See TracChangeset for help on using the changeset viewer.