From 50afd0aa1bbf597c1749320cf0489fdff8b017e6 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 27 Feb 2020 20:36:07 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@47387 git-svn-id: http://core.svn.wordpress.org/trunk@47174 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize-manager.php | 20 ++++++-------------- wp-includes/class-wp-customize-panel.php | 14 +++++++++++++- wp-includes/version.php | 2 +- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index e8e8454623..9d4ec4be36 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/wp-includes/class-wp-customize-manager.php @@ -3801,20 +3801,12 @@ final class WP_Customize_Manager { * @since 4.0.0 * @since 4.5.0 Return added WP_Customize_Panel instance. * - * @param WP_Customize_Panel|string $id Customize Panel object, or Panel ID. - * @param array $args { - * Optional. Array of properties for the new Panel object. Default empty array. + * @see WP_Customize_Panel::__construct() * - * @type int $priority Priority of the panel, defining the display order - * of panels and sections. Default 160. - * @type string $capability Capability required for the panel. - * Default `edit_theme_options`. - * @type string|string[] $theme_supports Theme features required to support the panel. - * @type string $title Title of the panel to show in UI. - * @type string $description Description to show in the UI. - * @type string $type Type of the panel. - * @type callable $active_callback Active callback. - * } + * @param WP_Customize_Panel|string $id Customize Panel object, or ID. + * @param array $args Optional. Array of properties for the new Panel object. + * See WP_Customize_Panel::__construct() for information + * on accepted arguments. Default empty array. * @return WP_Customize_Panel The instance of the panel that was added. */ public function add_panel( $id, $args = array() ) { @@ -3901,7 +3893,7 @@ final class WP_Customize_Manager { * * @see WP_Customize_Section::__construct() * - * @param WP_Customize_Section|string $id Customize Section object, or Section ID. + * @param WP_Customize_Section|string $id Customize Section object, or 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. diff --git a/wp-includes/class-wp-customize-panel.php b/wp-includes/class-wp-customize-panel.php index 858c0885a5..73ce2734ce 100644 --- a/wp-includes/class-wp-customize-panel.php +++ b/wp-includes/class-wp-customize-panel.php @@ -139,7 +139,19 @@ class WP_Customize_Panel { * * @param WP_Customize_Manager $manager Customizer bootstrap instance. * @param string $id A specific ID for the panel. - * @param array $args Panel arguments. + * @param array $args { + * Optional. Array of properties for the new Panel object. Default empty array. + * + * @type int $priority Priority of the panel, defining the display order + * of panels and sections. Default 160. + * @type string $capability Capability required for the panel. + * Default `edit_theme_options`. + * @type string|string[] $theme_supports Theme features required to support the panel. + * @type string $title Title of the panel to show in UI. + * @type string $description Description to show in the UI. + * @type string $type Type of the panel. + * @type callable $active_callback Active callback. + * } */ 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 3d47fdb7df..107964f99e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.4-beta3-47386'; +$wp_version = '5.4-beta3-47387'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.