
如何使用Varying Vagrant Vagrants (VVV) 进行WordPress开发
wp_custom_css_cb ( No parameters )
wp_custom_css_cb: 这是一个过滤钩,允许你修改WordPress定制器中的自定义CSS代码。自定义CSS代码通常用于在你的WordPress网站上应用自定义样式。
渲染自定义CSS样式元素。
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 // Note that esc_html() cannot be used because `div > span` is not interpreted properly. echo strip_tags( $styles ); ?> </style> <?php endif; }