wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_enqueue_global_styles_custom_css › WordPress Function

Since6.2.0
Deprecated6.7.0
wp_enqueue_global_styles_custom_css ( No parameters )
Defined at:
Codex:

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