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.
Built from https://develop.svn.wordpress.org/trunk@47386


git-svn-id: http://core.svn.wordpress.org/trunk@47173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-02-27 20:29:06 +00:00
parent 569319f553
commit 9043b9833f
3 changed files with 24 additions and 20 deletions

View File

@ -3899,25 +3899,12 @@ final class WP_Customize_Manager {
* @since 3.4.0
* @since 4.5.0 Return added WP_Customize_Section instance.
*
* @param WP_Customize_Section|string $id Customize Section object, or Section ID.
* @param array $args {
* Optional. Array of properties for the new Section object. Default empty array.
* @see WP_Customize_Section::__construct()
*
* @type int $priority Priority of the section, defining the display order
* of panels and sections. Default 160.
* @type string $panel The panel this section belongs to (if any).
* Default empty.
* @type string $capability Capability required for the section.
* Default 'edit_theme_options'
* @type string|string[] $theme_supports Theme features required to support the section.
* @type string $title Title of the section to show in UI.
* @type string $description Description to show in the UI.
* @type string $type Type of the section.
* @type callable $active_callback Active callback.
* @type bool $description_hidden Hide the description behind a help icon,
* instead of inline above the first control.
* Default false.
* }
* @param WP_Customize_Section|string $id Customize Section object, or Section ID.
* @param array $args Optional. Array of properties for the new Section object.
* See WP_Customize_Section::__construct() for information
* on accepted arguments. Default empty array.
* @return WP_Customize_Section The instance of the section that was added.
*/
public function add_section( $id, $args = array() ) {

View File

@ -150,7 +150,24 @@ class WP_Customize_Section {
*
* @param WP_Customize_Manager $manager Customizer bootstrap instance.
* @param string $id A specific ID of the section.
* @param array $args Section arguments.
* @param array $args {
* Optional. Array of properties for the new Section object. Default empty array.
*
* @type int $priority Priority of the section, defining the display order
* of panels and sections. Default 160.
* @type string $panel The panel this section belongs to (if any).
* Default empty.
* @type string $capability Capability required for the section.
* Default 'edit_theme_options'
* @type string|string[] $theme_supports Theme features required to support the section.
* @type string $title Title of the section to show in UI.
* @type string $description Description to show in the UI.
* @type string $type Type of the section.
* @type callable $active_callback Active callback.
* @type bool $description_hidden Hide the description behind a help icon,
* instead of inline above the first control.
* Default false.
* }
*/
public function __construct( $manager, $id, $args = array() ) {
$keys = array_keys( get_object_vars( $this ) );

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.4-beta3-47385';
$wp_version = '5.4-beta3-47386';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.