[ Index ]

WordPress 5.4.1

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    




/wp-includes/customize/ -> class-wp-customize-custom-css-setting.php (summary)

Customize API: WP_Customize_Custom_CSS_Setting class This handles validation, sanitization and saving of the value.

File Size: 202 lines (5 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 6 functions


Functions that are not part of a class:

__construct( $manager, $id, $args = array()   X-Ref
WP_Customize_Custom_CSS_Setting constructor.

param: WP_Customize_Manager $manager Customizer bootstrap instance.
param: string               $id      A specific ID of the setting.
param: array                $args    Setting arguments.

preview()   X-Ref
Add filter to preview post value.

return: bool False when preview short-circuits due no change needing to be previewed.

filter_previewed_wp_get_custom_css( $css, $stylesheet )   X-Ref
Filter `wp_get_custom_css` for applying the customized value.

This is used in the preview when `wp_get_custom_css()` is called for rendering the styles.

param: string $css        Original CSS.
param: string $stylesheet Current stylesheet.
return: string CSS.

value()   X-Ref
Fetch the value of the setting. Will return the previewed value when `preview()` is called.

return: string

validate( $css )   X-Ref
Validate CSS.

Checks for imbalanced braces, brackets, and comments.
Notifications are rendered when the customizer state is saved.

param: string $css The input string.
return: true|WP_Error True if the input was validated, otherwise WP_Error.

update( $css )   X-Ref
Store the CSS setting value in the custom_css custom post type for the stylesheet.

param: string $css The input value.
return: int|false The post ID or false if the value could not be saved.

Generated: Tue May 19 15:51:04 2020 Cross-referenced by PHPXref 0.7.1