看来答案是display_header_text()
.
我在customizer.php
在2016年的主题中。
相关代码:
/**
* Styles the header text displayed on the site.
*
* Create your own twentysixteen_header_style() function to override in a child theme.
*
* @since Twenty Sixteen 1.0
*
* @see twentysixteen_custom_header_and_background().
*/
function twentysixteen_header_style() {
// If the header text option is untouched, let\'s bail.
if ( display_header_text() ) {
return;
}
// If the header text has been hidden.
?>
<style type="text/css" id="twentysixteen-header-css">
.site-branding {
margin: 0 auto 0 0;
}
.site-branding .site-title,
.site-description {
clip: rect(1px, 1px, 1px, 1px);
position: absolute;
}
</style>
<?php
}
endif; // twentysixteen_header_style