Make WordPress Core


Ignore:
Timestamp:
11/04/2014 06:41:56 PM (12 years ago)
Author:
iandstewart
Message:

Twenty Fifteen: Simplify the header, sidebar, background controls and make customization faster for users to do. This has the added benefit of fixing our bug where hidden header text wasn't being updated on color scheme switch. Nice.

Props celloexpressions, iamtakashi, fixes #30164 and #29980.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfifteen/inc/custom-header.php

    r30221 r30230  
    8080function twentyfifteen_header_style() {
    8181        $header_image = get_header_image();
    82         $text_color   = get_header_textcolor();
    8382
    8483        // If no custom options for text are set, let's bail.
    85         if ( empty( $header_image ) && $text_color == get_theme_support( 'custom-header', 'default-text-color' ) ) {
     84        if ( empty( $header_image ) && display_header_text() ) {
    8685                return;
    8786        }
     
    126125                        position: absolute;
    127126                }
    128         <?php
    129                 // If the user has set a custom color for the text use that
    130                 elseif ( $text_color != get_theme_support( 'custom-header', 'default-text-color' ) ) :
    131         ?>
    132                 .site-title a,
    133                 .site-title a:hover,
    134                 .site-title a:focus,
    135                 .site-description {
    136                         color: #<?php echo esc_attr( $text_color ); ?>;
    137                 }
    138127        <?php endif; ?>
    139128        </style>
     
    229218        $css = '
    230219                /* Custom Sidebar Text Color */
     220                .site-title a,
     221                .site-description,
    231222                .secondary-toggle:before {
    232223                        color: %1$s;
     224                }
     225
     226                .site-title a:hover,
     227                .site-title a:focus {
     228                        color: %1$s; /* Fallback for IE7 and IE8 */
     229                        color: %2$s;
    233230                }
    234231
Note: See TracChangeset for help on using the changeset viewer.