Make WordPress Core

Ticket #26338: 26338.3.patch

File 26338.3.patch, 3.1 KB (added by lancewillett, 11 years ago)
  • wp-content/themes/twentyfourteen/inc/custom-header.php

     
    5555 *
    5656 */
    5757function twentyfourteen_header_style() {
    58         $header_text_color = get_header_textcolor();
     58        $text_color = get_header_textcolor();
    5959
    60         // If no custom options for text are set, let's bail
    61         // $header_text_color options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value
    62         if ( HEADER_TEXTCOLOR == $header_text_color )
     60        // If no custom color for text is set, let's bail.
     61        if ( display_header_text() && $text_color === get_theme_support( 'custom-header', 'default-text-color' ) )
    6362                return;
    64         // If we get this far, we have custom styles. Let's do this.
     63
     64        // If we get this far, we have custom styles.
    6565        ?>
    66         <style type="text/css">
     66        <style type="text/css" id="twentyfourteen-header-css">
    6767        <?php
    6868                // Has the text been hidden?
    69                 if ( 'blank' == $header_text_color ) :
     69                if ( ! display_header_text() ) :
    7070        ?>
    71                 .site-title {
    72                         position: absolute !important;
    73                         clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
     71                .site-title,
     72                .site-description {
     73                        position: absolute;
     74                        clip: rect(1px 1px 1px 1px); /* IE7 */
    7475                        clip: rect(1px, 1px, 1px, 1px);
    7576                }
    7677        <?php
    77                 // If the user has set a custom color for the text use that
    78                 else :
     78                // If the user has set a custom color for the text, use that.
     79                elseif ( $text_color != get_theme_support( 'custom-header', 'default-text-color' ) ) :
    7980        ?>
    8081                .site-title a {
    81                         color: #<?php echo $header_text_color; ?>;
     82                        color: #<?php echo esc_attr( $text_color ); ?>;
    8283                }
    8384        <?php endif; ?>
    8485        </style>
     
    9798 */
    9899function twentyfourteen_admin_header_style() {
    99100?>
    100         <style type="text/css">
     101        <style type="text/css" id="twentyfourteen-admin-header-css">
    101102        .appearance_page_custom-header #headimg {
    102103                background-color: #000;
    103104                border: none;
  • wp-content/themes/twentyfourteen/js/customizer.js

     
    77        // Site title and description.
    88        wp.customize( 'blogname', function( value ) {
    99                value.bind( function( to ) {
    10                         $( '.site-title a' ).text( to );
     10                        $( '.site-title' ).text( to );
    1111                } );
    1212        } );
    1313        wp.customize( 'blogdescription', function( value ) {
     
    1919        wp.customize( 'header_textcolor', function( value ) {
    2020                value.bind( function( to ) {
    2121                        if ( 'blank' === to ) {
    22                                 $( '.site-title a, .site-description' ).css( {
     22                                $( '.site-title, .site-description' ).css( {
    2323                                        'clip': 'rect(1px, 1px, 1px, 1px)',
    2424                                        'position': 'absolute'
    2525                                } );
    2626                        } else {
    27                                 $( '.site-title a,  .site-description' ).css( {
     27                                $( '.site-title,  .site-description' ).css( {
    2828                                        'clip': 'auto',
    29                                         'position': 'relative'
     29                                        'position': 'static'
    3030                                } );
    3131
    3232                                $( '.site-title a' ).css( {