From b7e526d2ce1b6cda88ec28d795b73e4dff5dd8df Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 21 Mar 2012 18:48:57 +0000 Subject: [PATCH] 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 --- wp-includes/theme.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 3bf9859c1d..d3ff396b7a 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -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. *