WordPress开发者和主题制作者的搜索引擎



wp_custom_css_cb ›

Since4.7.0
已弃用n/a
wp_custom_css_cb ( 没有参数 )
定义在:
文档:

Render the Custom CSS style element.



源码

function wp_custom_css_cb() {
	$styles = wp_get_custom_css();
	if ( $styles || is_customize_preview() ) :
		$type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"';
		?>
		<style<?php echo $type_attr; ?> id="wp-custom-css">
			<?php echo strip_tags( $styles ); // Note that esc_html() cannot be used because `div &gt; span` is not interpreted properly. ?>
		</style>
		<?php
	endif;
}