mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Twenty Fifteen: check if user-selected custom colors are the same as default so we're not duplicating styles.
Props iamtakashi, fixes #30234 git-svn-id: https://develop.svn.wordpress.org/trunk@30221 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user