| [ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
Customize API: WP_Customize_Custom_CSS_Setting class This handles validation, sanitization and saving of the value.
| File Size: | 212 lines (5 kb) |
| Included or required: | 1 time |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| __construct( $manager, $id, $args = array() X-Ref |
| WP_Customize_Custom_CSS_Setting constructor. since: 4.7.0 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. since: 4.7.9 |
| filter_previewed_wp_get_custom_css( $css, $stylesheet ) X-Ref |
| Filters `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. return: string CSS. since: 4.7.0 param: string $css Original CSS. param: string $stylesheet Current stylesheet. |
| value() X-Ref |
| Fetch the value of the setting. Will return the previewed value when `preview()` is called. return: string since: 4.7.0 |
| validate( $value ) X-Ref |
| Validate a received value for being valid CSS. Checks for imbalanced braces, brackets, and comments. Notifications are rendered when the customizer state is saved. return: true|WP_Error True if the input was validated, otherwise WP_Error. since: 4.7.0 since: 4.9.0 Checking for balanced characters has been moved client-side via linting in code editor. since: 5.9.0 Renamed `$css` to `$value` for PHP 8 named parameter support. param: string $value CSS to validate. |
| update( $value ) X-Ref |
| Store the CSS setting value in the custom_css custom post type for the stylesheet. return: int|false The post ID or false if the value could not be saved. since: 4.7.0 since: 5.9.0 Renamed `$css` to `$value` for PHP 8 named parameter support. param: string $value CSS to update. |
| Generated: Sat Nov 8 01:00:02 2025 | Cross-referenced by PHPXref 0.7.1 |