Introduce display_header_text(). props chipbennett for initial patch. see #18887.

git-svn-id: https://develop.svn.wordpress.org/trunk@20240 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-03-21 18:48:57 +00:00
parent 33e990c8dd
commit b7e526d2ce
1 changed files with 15 additions and 0 deletions

View File

@ -918,6 +918,21 @@ function header_textcolor() {
echo get_header_textcolor();
}
/**
* Whether to display the header text.
*
* @since 3.4.0
*
* @return bool
*/
function display_header_text() {
if ( ! current_theme_supports( 'custom-header', 'header-text' ) )
return false;
$text_color = get_theme_mod( 'header_textcolor', get_theme_support( 'custom-header', 'default-text-color' ) );
return $text_color && 'blank' != $text_color;
}
/**
* Retrieve header image for custom header.
*