From 98a20461dc80a8a8e854dea7732d485d98f49cb3 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 13 May 2010 21:44:37 +0000 Subject: [PATCH] Check if HEADER_ constants are defined before continuing. props ocean90, fixes #13367. git-svn-id: https://develop.svn.wordpress.org/trunk@14610 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/theme.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 912802739e..bf3a778cac 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1326,7 +1326,9 @@ function remove_theme_mods() { * @return string */ function get_header_textcolor() { - return get_theme_mod('header_textcolor', HEADER_TEXTCOLOR); + $default = defined('HEADER_TEXTCOLOR') ? HEADER_TEXTCOLOR : ''; + + return get_theme_mod('header_textcolor', $default); } /** @@ -1347,7 +1349,9 @@ function header_textcolor() { * @return string */ function get_header_image() { - return get_theme_mod('header_image', HEADER_IMAGE); + $default = defined('HEADER_IMAGE') ? HEADER_IMAGE : ''; + + return get_theme_mod('header_image', $default); } /**