From 7dfb040dde302143c75ca94153e86e390b4e39b4 Mon Sep 17 00:00:00 2001 From: Ian Stewart Date: Mon, 3 Nov 2014 21:59:22 +0000 Subject: [PATCH] Twenty Fifteen: check if user-selected custom colors are the same as default so we're not duplicating styles. Props iamtakashi, fixes #30234 Built from https://develop.svn.wordpress.org/trunk@30221 git-svn-id: http://core.svn.wordpress.org/trunk@30221 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyfifteen/inc/custom-header.php | 8 ++++++-- wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/wp-content/themes/twentyfifteen/inc/custom-header.php b/wp-content/themes/twentyfifteen/inc/custom-header.php index 65a26af018..12b30c29ca 100644 --- a/wp-content/themes/twentyfifteen/inc/custom-header.php +++ b/wp-content/themes/twentyfifteen/inc/custom-header.php @@ -167,10 +167,12 @@ endif; // twentyfifteen_admin_header_image * @since Twenty Fifteen 1.0 */ function twentyfifteen_header_background_color_css() { + $color_scheme = twentyfifteen_get_color_scheme(); + $default_color = $color_scheme[1]; $header_background_color = get_theme_mod( 'header_background_color', '#ffffff' ); // Don't do anything if the current color is the default. - if ( '#ffffff' === $header_background_color ) { + if ( $header_background_color === $default_color ) { return; } @@ -209,10 +211,12 @@ add_action( 'wp_enqueue_scripts', 'twentyfifteen_header_background_color_css', 1 * @since Twenty Fifteen 1.0 */ function twentyfifteen_sidebar_text_color_css() { + $color_scheme = twentyfifteen_get_color_scheme(); + $default_color = $color_scheme[4]; $sidebar_link_color = get_theme_mod( 'sidebar_textcolor', '#333333' ); // Don't do anything if the current color is the default. - if ( '#333333' === $sidebar_link_color ) { + if ( $sidebar_link_color === $default_color ) { return; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 79a18d571a..8a26bc9e21 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-alpha-30220'; +$wp_version = '4.1-alpha-30221'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.