[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
WordPress Customize Setting classes
File Size: | 983 lines (30 kb) |
Included or required: | 1 time |
Referenced: | 0 times |
Includes or requires: | 5 files wp-includes/customize/class-wp-customize-background-image-setting.php wp-includes/customize/class-wp-customize-nav-menu-item-setting.php wp-includes/customize/class-wp-customize-filter-setting.php wp-includes/customize/class-wp-customize-header-image-setting.php wp-includes/customize/class-wp-customize-nav-menu-setting.php |
WP_Customize_Setting:: (26 methods):
__construct()
id_data()
aggregate_multidimensional()
reset_aggregated_multidimensionals()
is_current_blog_previewed()
preview()
_clear_aggregated_multidimensional_preview_applied_flag()
_preview_filter()
_multidimensional_preview_filter()
save()
post_value()
sanitize()
validate()
get_root_value()
set_root_value()
update()
_update_theme_mod()
_update_option()
value()
js_value()
json()
check_capabilities()
multidimensional()
multidimensional_replace()
multidimensional_get()
multidimensional_isset()
Class: WP_Customize_Setting - X-Ref
Customize Setting class.__construct( $manager, $id, $args = array() X-Ref |
Constructor. Any supplied $args override class property defaults. param: WP_Customize_Manager $manager Customizer bootstrap instance. param: string $id A specific ID of the setting. param: array $args { since: 3.4.0 |
id_data() X-Ref |
Get parsed ID data for multidimensional setting. return: array { since: 4.4.0 |
aggregate_multidimensional() X-Ref |
Set up the setting for aggregated multidimensional values. When a multidimensional setting gets aggregated, all of its preview and update calls get combined into one call, greatly improving performance. since: 4.4.0 |
reset_aggregated_multidimensionals() X-Ref |
Reset `$aggregated_multidimensionals` static variable. This is intended only for use by unit tests. since: 4.5.0 |
is_current_blog_previewed() X-Ref |
Return true if the current site is not the same as the previewed site. return: bool If preview() has been called. since: 4.2.0 |
preview() X-Ref |
Add filters to supply the setting's value when accessed. If the setting already has a pre-existing value and there is no incoming post value for the setting, then this method will short-circuit since there is no change to preview. return: bool False when preview short-circuits due no change needing to be previewed. since: 3.4.0 since: 4.4.0 Added boolean return value. |
_clear_aggregated_multidimensional_preview_applied_flag() X-Ref |
Clear out the previewed-applied flag for a multidimensional-aggregated value whenever its post value is updated. This ensures that the new value will get sanitized and used the next time that `WP_Customize_Setting::_multidimensional_preview_filter()` is called for this setting. since: 4.4.0 |
_preview_filter( $original ) X-Ref |
Callback function to filter non-multidimensional theme mods and options. If switch_to_blog() was called after the preview() method, and the current site is now not the same site, then this method does a no-op and returns the original value. return: mixed New or old value. param: mixed $original Old value. since: 3.4.0 |
_multidimensional_preview_filter( $original ) X-Ref |
Callback function to filter multidimensional theme mods and options. For all multidimensional settings of a given type, the preview filter for the first setting previewed will be used to apply the values for the others. return: mixed New or old value. param: mixed $original Original root value. since: 4.4.0 |
save() X-Ref |
Checks user capabilities and theme supports, and then saves the value of the setting. return: void|false Void on success, false if cap check fails since: 3.4.0 |
post_value( $default_value = null ) X-Ref |
Fetch and sanitize the $_POST value for the setting. During a save request prior to save, post_value() provides the new value while value() does not. return: mixed The default value on failure, otherwise the sanitized and validated value. param: mixed $default_value A default value which is used as a fallback. Default null. since: 3.4.0 |
sanitize( $value ) X-Ref |
Sanitize an input. return: string|array|null|WP_Error Sanitized value, or `null`/`WP_Error` if invalid. param: string|array $value The value to sanitize. since: 3.4.0 |
validate( $value ) X-Ref |
Validates an input. return: true|WP_Error True if the input was validated, otherwise WP_Error. param: mixed $value Value to validate. since: 4.6.0 |
get_root_value( $default_value = null ) X-Ref |
Get the root value for a setting, especially for multidimensional ones. return: mixed param: mixed $default_value Value to return if root does not exist. since: 4.4.0 |
set_root_value( $value ) X-Ref |
Set the root value for a setting, especially for multidimensional ones. return: bool Whether the multidimensional root was updated successfully. param: mixed $value Value to set as root of multidimensional setting. since: 4.4.0 |
update( $value ) X-Ref |
Save the value of the setting, using the related API. return: bool The result of saving the value. param: mixed $value The value to update. since: 3.4.0 |
_update_theme_mod() X-Ref |
Deprecated method. since: 3.4.0 |
_update_option() X-Ref |
Deprecated method. since: 3.4.0 |
value() X-Ref |
Fetch the value of the setting. return: mixed The value. since: 3.4.0 |
js_value() X-Ref |
Sanitize the setting's value for use in JavaScript. return: mixed The requested escaped value. since: 3.4.0 |
json() X-Ref |
Retrieves the data to export to the client via JSON. return: array Array of parameters passed to JavaScript. since: 4.6.0 |
check_capabilities() X-Ref |
Validate user capabilities whether the theme supports the setting. return: bool False if theme doesn't support the setting or user can't change setting, otherwise true. since: 3.4.0 |
multidimensional( &$root, $keys, $create = false ) X-Ref |
Multidimensional helper function. return: array|void Keys are 'root', 'node', and 'key'. param: array $root param: array $keys param: bool $create Default false. since: 3.4.0 |
multidimensional_replace( $root, $keys, $value ) X-Ref |
Will attempt to replace a specific value in a multidimensional array. return: mixed param: array $root param: array $keys param: mixed $value The value to update. since: 3.4.0 |
multidimensional_get( $root, $keys, $default_value = null ) X-Ref |
Will attempt to fetch a specific value from a multidimensional array. return: mixed The requested value or the default value. param: array $root param: array $keys param: mixed $default_value A default value which is used as a fallback. Default null. since: 3.4.0 |
multidimensional_isset( $root, $keys ) X-Ref |
Will attempt to check if a specific value in a multidimensional array is set. return: bool True if value is set, false if not. param: array $root param: array $keys since: 3.4.0 |
Generated: Thu Nov 21 01:00:03 2024 | Cross-referenced by PHPXref 0.7.1 |