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



wp_custom_css_cb › WordPress Function

Since4.7.0
Deprecatedn/a
wp_custom_css_cb ( No parameters )
Defined at:
Codex:

Renders the Custom CSS style element.



Source

function wp_custom_css_cb() {
	$styles = wp_get_custom_css();
	if ( ! $styles && ! is_customize_preview() ) {
		return;
	}

	$processor = new WP_HTML_Tag_Processor( '<style></style>' );
	$processor->next_tag();
	$processor->set_attribute( 'id', 'wp-custom-css' );
	$processor->set_modifiable_text( "\n{$styles}\n" );
	echo "{$processor->get_updated_html()}\n";
}