_custom_logo_header_styles
函数
_custom_logo_header_styles ( No parameters )
- Access
- Private
- 定义位置
-
-
wp-includes/theme.php
, line 2887
-
wp-includes/theme.php
- 引入
- 4.5.0
- 弃用
- –
根据Customizer的设置,添加CSS来隐藏自定义标志的标题文本。
function _custom_logo_header_styles() {
if ( ! current_theme_supports( 'custom-header', 'header-text' )
&& get_theme_support( 'custom-logo', 'header-text' )
&& ! get_theme_mod( 'header_text', true )
) {
$classes = (array) get_theme_support( 'custom-logo', 'header-text' );
$classes = array_map( 'sanitize_html_class', $classes );
$classes = '.' . implode( ', .', $classes );
$type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"';
?>
>
{
position: absolute;
clip: rect(1px, 1px, 1px, 1px);
}
<?php }
}
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。