wp_enqueue_global_styles_css_custom_properties() WordPress Function

This function allows you to enqueue a global stylesheet that uses CSS Custom Properties.

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

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' );
}


Top ↑

Changelog

Changelog
VersionDescription
5.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More