프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$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. |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_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. |
메소드 | 설명 | |
---|---|---|
__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. |
메소드 | 설명 | |
---|---|---|
_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. |
리턴 | mixed | New or old value. |
public _preview_filter ( mixed $original ) : mixed | ||
$original | mixed | Old value. |
리턴 | mixed | New or old value. |
protected aggregate_multidimensional ( ) |
final public check_capabilities ( ) : boolean | ||
리턴 | 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. |
리턴 | mixed |
public is_current_blog_previewed ( ) : boolean | ||
리턴 | 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. |
리턴 | mixed | The requested value or the default value. |
final protected multidimensional_isset ( $root, $keys ) : boolean | ||
$root | ||
$keys | ||
리턴 | 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. |
리턴 | mixed |
final public post_value ( mixed $default = null ) : mixed | ||
$default | mixed | A default value which is used as a fallback. Default is null. |
리턴 | 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. |
리턴 | boolean | Whether the multidimensional root was updated successfully. |
protected mixed $_original_value | ||
리턴 | mixed |
protected int $_previewed_blog_id | ||
리턴 | integer |
protected static array $aggregated_multidimensionals | ||
리턴 | array |
public string $capability | ||
리턴 | string |
public bool $dirty | ||
리턴 | boolean |
protected bool $is_multidimensional_aggregated | ||
리턴 | boolean |
protected bool $is_previewed | ||
리턴 | boolean |
public string $theme_supports | ||
리턴 | string |
public callback $validate_callback | ||
리턴 | callback |