diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php index 291986e751..5a81102e24 100644 --- a/wp-admin/custom-header.php +++ b/wp-admin/custom-header.php @@ -208,16 +208,17 @@ class Custom_Image_Header { return; } - if ( isset( $_POST['text-color'] ) ) { + if ( ! isset( $_POST['display-header-text'] ) ) { + check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' ); + set_theme_mod( 'header_textcolor', 'blank' ); + } elseif ( isset( $_POST['text-color'] ) ) { check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' ); $_POST['text-color'] = str_replace( '#', '', $_POST['text-color'] ); - if ( 'blank' == $_POST['text-color'] ) { + $color = preg_replace('/[^0-9a-fA-F]/', '', $_POST['text-color']); + if ( strlen($color) == 6 || strlen($color) == 3 ) + set_theme_mod('header_textcolor', $color); + elseif ( ! $color ) set_theme_mod( 'header_textcolor', 'blank' ); - } else { - $color = preg_replace('/[^0-9a-fA-F]/', '', $_POST['text-color']); - if ( strlen($color) == 6 || strlen($color) == 3 ) - set_theme_mod('header_textcolor', $color); - } } if ( isset( $_POST['default-header'] ) ) { @@ -329,86 +330,75 @@ class Custom_Image_Header { function js_1() { ?> +

+ @@ -519,14 +511,13 @@ class Custom_Image_Header { ?>
-

onclick="return false;" href="">

-
>
+

onclick="return false;" href="">

+
>
@@ -618,33 +609,32 @@ class Custom_Image_Header {
- + + + +

+ - - + + - + @@ -662,7 +652,7 @@ class Custom_Image_Header {

- - - +

+ - #blank as text color.' );?> - + + + +

-