Docs: Clarify the type of theme_supports argument in various Customizer classes.

Props marekdedic.
See #48347.
Built from https://develop.svn.wordpress.org/trunk@47385


git-svn-id: http://core.svn.wordpress.org/trunk@47172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-02-27 20:23:06 +00:00
parent 8c5a8f1811
commit 569319f553
5 changed files with 47 additions and 40 deletions

View File

@ -3803,15 +3803,17 @@ final class WP_Customize_Manager {
*
* @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.
* @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|array $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.
* 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.
* }
* @return WP_Customize_Panel The instance of the panel that was added.
*/
@ -3900,16 +3902,21 @@ final class WP_Customize_Manager {
* @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.
* @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|array $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.
*
* @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.
* }
* @return WP_Customize_Section The instance of the section that was added.
*/

View File

@ -69,10 +69,10 @@ class WP_Customize_Panel {
public $capability = 'edit_theme_options';
/**
* Theme feature support for the panel.
* Theme features required to support the panel.
*
* @since 4.0.0
* @var string|array
* @var string|string[]
*/
public $theme_supports = '';

View File

@ -77,10 +77,10 @@ class WP_Customize_Section {
public $capability = 'edit_theme_options';
/**
* Theme feature support for the section.
* Theme features required to support the section.
*
* @since 3.4.0
* @var string|array
* @var string|string[]
*/
public $theme_supports = '';

View File

@ -51,10 +51,10 @@ class WP_Customize_Setting {
public $capability = 'edit_theme_options';
/**
* Feature a theme is required to support to enable this setting.
* Theme features required to support the setting.
*
* @since 3.4.0
* @var string
* @var string|string[]
*/
public $theme_supports = '';
@ -157,21 +157,21 @@ class WP_Customize_Setting {
* @param string $id A specific ID of the setting.
* Can be a theme mod or option name.
* @param array $args {
* Optional. Array of properties for the new Setting object. Default empty array.
* Optional. Array of properties for the new Setting object. Default empty array.
*
* @type string $type Type of the setting. Default 'theme_mod'.
* @type string $capability Capability required for the setting. Default 'edit_theme_options'
* @type string|array $theme_supports Theme features required to support the panel. Default is none.
* @type string $default Default value for the setting. Default is empty string.
* @type string $transport Options for rendering the live preview of changes in Customizer.
* Using 'refresh' makes the change visible by reloading the whole preview.
* Using 'postMessage' allows a custom JavaScript to handle live changes.
* Default is 'refresh'.
* @type callable $validate_callback Server-side validation callback for the setting's value.
* @type callable $sanitize_callback Callback to filter a Customize setting value in un-slashed form.
* @type callable $sanitize_js_callback Callback to convert a Customize PHP setting value to a value that is
* JSON serializable.
* @type bool $dirty Whether or not the setting is initially dirty when created.
* @type string $type Type of the setting. Default 'theme_mod'.
* @type string $capability Capability required for the setting. Default 'edit_theme_options'
* @type string|string[] $theme_supports Theme features required to support the panel. Default is none.
* @type string $default Default value for the setting. Default is empty string.
* @type string $transport Options for rendering the live preview of changes in Customizer.
* Using 'refresh' makes the change visible by reloading the whole preview.
* Using 'postMessage' allows a custom JavaScript to handle live changes.
* Default is 'refresh'.
* @type callable $validate_callback Server-side validation callback for the setting's value.
* @type callable $sanitize_callback Callback to filter a Customize setting value in un-slashed form.
* @type callable $sanitize_js_callback Callback to convert a Customize PHP setting value to a value that is
* JSON serializable.
* @type bool $dirty Whether or not the setting is initially dirty when created.
* }
*/
public function __construct( $manager, $id, $args = array() ) {

View File

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