Docs: Add a reference to WP_Customize_Setting::__construct() for information on accepted arguments in WP_Customize_Manager::add_setting().
Synchronize the documentation between two places, use `WP_Customize_Setting::__construct()` as the canonical source. Props tmanoilov, marekdedic. Fixes #48347. Built from https://develop.svn.wordpress.org/trunk@47384 git-svn-id: http://core.svn.wordpress.org/trunk@47171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -156,7 +156,23 @@ class WP_Customize_Setting {
|
||||
* @param WP_Customize_Manager $manager Customizer bootstrap instance.
|
||||
* @param string $id A specific ID of the setting.
|
||||
* Can be a theme mod or option name.
|
||||
* @param array $args Setting arguments.
|
||||
* @param array $args {
|
||||
* 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.
|
||||
* }
|
||||
*/
|
||||
public function __construct( $manager, $id, $args = array() ) {
|
||||
$keys = array_keys( get_object_vars( $this ) );
|
||||
|
||||
Reference in New Issue
Block a user