Make WordPress Core

Ticket #24128: 24128.3.diff

File 24128.3.diff, 4.9 KB (added by DavidTheMachine, 11 years ago)

24128.2 applied relative to the root directory

  • wp-content/themes/twentyeleven/functions.php

     
    251251        ?>
    252252                #site-title,
    253253                #site-description {
    254                         position: absolute !important;
     254                        position: absolute;
    255255                        clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
    256256                        clip: rect(1px, 1px, 1px, 1px);
    257257                }
     
    261261        ?>
    262262                #site-title a,
    263263                #site-description {
    264                         color: #<?php echo $text_color; ?> !important;
     264                        color: #<?php echo $text_color; ?>;
    265265                }
    266266        <?php endif; ?>
    267267        </style>
  • wp-content/themes/twentyeleven/header.php

     
    4444
    4545        ?></title>
    4646<link rel="profile" href="http://gmpg.org/xfn/11" />
    47 <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
     47<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>?v=20130419" />
    4848<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    4949<!--[if lt IE 9]>
    5050<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
     
    117117                        <?php endif; // end check for removed header image ?>
    118118
    119119                        <?php
    120                                 // Has the text been hidden?
    121                                 if ( 'blank' == get_header_textcolor() ) :
     120                                $search_classes = array();
     121
     122                                if ( $header_image )
     123                                        $search_classes[] = 'with-image';
     124
     125                                if ( 'blank' == get_header_textcolor() )
     126                                        $search_classes[] = 'only-search';
     127
     128                                $search_classes = implode( ' ', $search_classes );
    122129                        ?>
    123                                 <div class="only-search<?php if ( $header_image ) : ?> with-image<?php endif; ?>">
     130                        <div class="<?php echo esc_attr( $search_classes ); ?>">
    124131                                <?php get_search_form(); ?>
    125                                 </div>
    126                         <?php
    127                                 else :
    128                         ?>
    129                                 <?php get_search_form(); ?>
    130                         <?php endif; ?>
     132                        </div>
    131133
    132134                        <nav id="access" role="navigation">
    133135                                <h3 class="assistive-text"><?php _e( 'Main menu', 'twentyeleven' ); ?></h3>
  • wp-content/themes/twentyeleven/inc/theme-customizer.js

     
    99                        $( '#site-description' ).text( to );
    1010                } );
    1111        } );
     12
     13        // Header text color
     14        wp.customize( 'header_textcolor', function( value ) {
     15                value.bind( function( to ) {
     16                        if ( 'blank' === to ) {
     17                                $( '#site-title, #site-title a, #site-description' ).css( {
     18                                        'clip': 'rect(1px, 1px, 1px, 1px)',
     19                                        'position': 'absolute'
     20                                } );
     21                                $( '#branding' ).find( '#searchform' ).parent().addClass('only-search');
     22                        } else {
     23                                $( '#site-title, #site-title a, #site-description' ).css( {
     24                                        'clip': 'auto',
     25                                        'color': to,
     26                                        'position': 'relative'
     27                                } );
     28                                $( '#branding' ).find( '#searchform' ).parent().removeClass('only-search');
     29                        }
     30                } );
     31        } );
    1232} )( jQuery );
     33 No newline at end of file
  • wp-content/themes/twentyeleven/inc/theme-options.php

     
    508508function twentyeleven_customize_register( $wp_customize ) {
    509509        $wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
    510510        $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
     511        $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
    511512
    512513        $options  = twentyeleven_get_theme_options();
    513514        $defaults = twentyeleven_get_default_theme_options();
     
    581582 * @since Twenty Eleven 1.3
    582583 */
    583584function twentyeleven_customize_preview_js() {
    584         wp_enqueue_script( 'twentyeleven-customizer', get_template_directory_uri() . '/inc/theme-customizer.js', array( 'customize-preview' ), '20120523', true );
     585        wp_enqueue_script( 'twentyeleven-customizer', get_template_directory_uri() . '/inc/theme-customizer.js', array( 'customize-preview' ), '20130419', true );
    585586}
    586587add_action( 'customize_preview_init', 'twentyeleven_customize_preview_js' );
     588 No newline at end of file
  • wp-content/themes/twentyeleven/style.css

     
    681681#branding .only-search #s:focus {
    682682        background-color: #bbb;
    683683}
    684 #branding .with-image #searchform {
     684#branding .only-search.with-image #searchform {
    685685        top: auto;
    686686        bottom: -27px;
    687687        max-width: 195px;
    688688}
    689 #branding .only-search + #access div {
     689#branding .only-search + #access div ul {
    690690        padding-right: 205px;
    691691}
    692692