Property | Type | Description | |
---|---|---|---|
$capability | string | Capability required to edit this setting. | |
$default | |||
$dirty | boolean | This is used to ensure that a setting will be sent from the pane to the preview when loading the Customizer. Normally a setting only is synced to the preview if it has been changed. This allows the setting to be sent from the start. | |
$id | string | Unique string identifier for the setting. | |
$manager | WP_Customize_Manager | ||
$sanitize_callback | |||
$sanitize_js_callback | |||
$theme_supports | string | Feature a theme is required to support to enable this setting. | |
$transport | |||
$type | string | ||
$validate_callback | callback | Server-side sanitization callback for the setting's value. |
Property | Type | Description | |
---|---|---|---|
$_original_value | mixed | Original non-previewed value stored by the preview method. | |
$_previewed_blog_id | integer | The ID for the current site when the preview() method was called. | |
$aggregated_multidimensionals | array | Cache of multidimensional values to improve performance. | |
$id_data | array | ||
$is_multidimensional_aggregated | boolean | Whether the multidimensional setting is aggregated. | |
$is_previewed | boolean | Whether or not preview() was called. |
Method | Description | |
---|---|---|
__construct ( WP_Customize_Manager $manager, string $id, array $args = [] ) | Constructor. | |
_clear_aggregated_multidimensional_preview_applied_flag ( ) | Clear out the previewed-applied flag for a multidimensional-aggregated value whenever its post value is updated. | |
_multidimensional_preview_filter ( mixed $original ) : mixed | Callback function to filter multidimensional theme mods and options. | |
_preview_filter ( mixed $original ) : mixed | Callback function to filter non-multidimensional theme mods and options. | |
check_capabilities ( ) : boolean | Validate user capabilities whether the theme supports the setting. | |
id_data ( ) : array | Get parsed ID data for multidimensional setting. | |
is_current_blog_previewed ( ) : boolean | Return true if the current site is not the same as the previewed site. | |
js_value ( ) : mixed | Sanitize the setting's value for use in JavaScript. | |
json ( ) : array | Retrieves the data to export to the client via JSON. | |
post_value ( mixed $default = null ) : mixed | Fetch and sanitize the $_POST value for the setting. | |
preview ( ) : boolean | Add filters to supply the setting's value when accessed. | |
reset_aggregated_multidimensionals ( ) | Reset $aggregated_multidimensionals static variable. | |
sanitize ( string | array $value ) : string | array | null | WP_Error | Sanitize an input. | |
save ( ) : false | void | Checks user capabilities and theme supports, and then saves the value of the setting. | |
validate ( mixed $value ) : true | WP_Error | Validates an input. | |
value ( ) : mixed | Fetch the value of the setting. |
Method | Description | |
---|---|---|
_update_option ( ) | Deprecated method. | |
_update_theme_mod ( ) | Deprecated method. | |
aggregate_multidimensional ( ) | Set up the setting for aggregated multidimensional values. | |
get_root_value ( mixed $default = null ) : mixed | Get the root value for a setting, especially for multidimensional ones. | |
multidimensional ( &$root, $keys, boolean $create = false ) : array | void | Multidimensional helper function. | |
multidimensional_get ( $root, $keys, mixed $default = null ) : mixed | Will attempt to fetch a specific value from a multidimensional array. | |
multidimensional_isset ( $root, $keys ) : boolean | Will attempt to check if a specific value in a multidimensional array is set. | |
multidimensional_replace ( $root, $keys, mixed $value ) : mixed | Will attempt to replace a specific value in a multidimensional array. | |
set_root_value ( mixed $value ) : boolean | Set the root value for a setting, especially for multidimensional ones. | |
update ( mixed $value ) : boolean | Save the value of the setting, using the related API. |
public __construct ( WP_Customize_Manager $manager, string $id, array $args = [] ) | ||
$manager | WP_Customize_Manager | |
$id | string | An specific ID of the setting. Can be a theme mod or option name. |
$args | array | Setting arguments. |
final public _clear_aggregated_multidimensional_preview_applied_flag ( ) |
final public _multidimensional_preview_filter ( mixed $original ) : mixed | ||
$original | mixed | Original root value. |
return | mixed | New or old value. |
public _preview_filter ( mixed $original ) : mixed | ||
$original | mixed | Old value. |
return | mixed | New or old value. |
protected aggregate_multidimensional ( ) |
final public check_capabilities ( ) : boolean | ||
return | boolean | False if theme doesn't support the setting or user can't change setting, otherwise true. |
protected get_root_value ( mixed $default = null ) : mixed | ||
$default | mixed | Value to return if root does not exist. |
return | mixed |
public is_current_blog_previewed ( ) : boolean | ||
return | boolean | If preview() has been called. |
final protected multidimensional_get ( $root, $keys, mixed $default = null ) : mixed | ||
$root | ||
$keys | ||
$default | mixed | A default value which is used as a fallback. Default is null. |
return | mixed | The requested value or the default value. |
final protected multidimensional_isset ( $root, $keys ) : boolean | ||
$root | ||
$keys | ||
return | boolean | True if value is set, false if not. |
final protected multidimensional_replace ( $root, $keys, mixed $value ) : mixed | ||
$root | ||
$keys | ||
$value | mixed | The value to update. |
return | mixed |
final public post_value ( mixed $default = null ) : mixed | ||
$default | mixed | A default value which is used as a fallback. Default is null. |
return | mixed | The default value on failure, otherwise the sanitized and validated value. |
public static reset_aggregated_multidimensionals ( ) |
protected set_root_value ( mixed $value ) : boolean | ||
$value | mixed | Value to set as root of multidimensional setting. |
return | boolean | Whether the multidimensional root was updated successfully. |
protected mixed $_original_value | ||
return | mixed |
protected int $_previewed_blog_id | ||
return | integer |
protected static array $aggregated_multidimensionals | ||
return | array |
public string $capability | ||
return | string |
public bool $dirty | ||
return | boolean |
protected bool $is_multidimensional_aggregated | ||
return | boolean |
protected bool $is_previewed | ||
return | boolean |
public string $theme_supports | ||
return | string |
public callback $validate_callback | ||
return | callback |