Enqueues the global styles custom css defined via theme.json.
Source
function wp_enqueue_global_styles_custom_css() {
_deprecated_function( __FUNCTION__, '6.7.0', 'wp_enqueue_global_styles' );
if ( ! wp_is_block_theme() ) {
return;
}
// Don't enqueue Customizer's custom CSS separately.
remove_action( 'wp_head', 'wp_custom_css_cb', 101 );
$custom_css = wp_get_custom_css();
$custom_css .= wp_get_global_styles_custom_css();
if ( ! empty( $custom_css ) ) {
wp_add_inline_style( 'global-styles', $custom_css );
}
}
Changelog
Version | Description |
---|---|
6.7.0 | Use 'wp_enqueue_global_styles' instead. |
6.2.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.