On this page
wp_enqueue_global_styles_css_custom_properties()
Function that enqueues the CSS Custom Properties coming from theme.json.
Source
File: wp-includes/script-loader.php. View all references
function wp_enqueue_global_styles_css_custom_properties() {
wp_register_style( 'global-styles-css-custom-properties', false, array(), true, true );
wp_add_inline_style( 'global-styles-css-custom-properties', wp_get_global_stylesheet( array( 'variables' ) ) );
wp_enqueue_style( 'global-styles-css-custom-properties' );
}
Related
Uses
| Uses | Description |
|---|---|
| wp_get_global_stylesheet() wp-includes/global-styles-and-settings.php | Returns the stylesheet resulting of merging core, theme, and user data. |
| wp_register_style() wp-includes/functions.wp-styles.php | Register a CSS stylesheet. |
| wp_add_inline_style() wp-includes/functions.wp-styles.php | Add extra CSS styles to a registered stylesheet. |
| wp_enqueue_style() wp-includes/functions.wp-styles.php | Enqueue a CSS stylesheet. |
Changelog
| Version | Description |
|---|---|
| 5.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_enqueue_global_styles_css_custom_properties