Docs: Clarify the type of theme_supports
argument in various Customizer classes.
Props marekdedic. See #48347. git-svn-id: https://develop.svn.wordpress.org/trunk@47385 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9793244c74
commit
33b88a7c7f
@ -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.
|
||||
*/
|
||||
|
@ -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 = '';
|
||||
|
||||
|
@ -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 = '';
|
||||
|
||||
|
@ -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() ) {
|
||||
|
Loading…
Reference in New Issue
Block a user