From 9043b9833f4be81b30e9c95da019854df133e2fa Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 27 Feb 2020 20:29:06 +0000 Subject: [PATCH] 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 --- wp-includes/class-wp-customize-manager.php | 23 +++++----------------- wp-includes/class-wp-customize-section.php | 19 +++++++++++++++++- wp-includes/version.php | 2 +- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index b022c1cde8..e8e8454623 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/wp-includes/class-wp-customize-manager.php @@ -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() ) { diff --git a/wp-includes/class-wp-customize-section.php b/wp-includes/class-wp-customize-section.php index 97b1429c61..8a843f0fe6 100644 --- a/wp-includes/class-wp-customize-section.php +++ b/wp-includes/class-wp-customize-section.php @@ -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 ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 22ffb12c2f..3d47fdb7df 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.