WordPress.org

Make WordPress Core

Ticket #23585: 23585.2.diff

File 23585.2.diff, 2.4 KB (added by SriniG, 5 years ago)

Updating the 'version' parameter for wp_enqueue_script( 'twentythirteen-customizer',...)

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

     
    552552 * @return void
    553553 */
    554554function twentythirteen_customize_register( $wp_customize ) {
    555         $wp_customize->get_setting( 'blogname' )->transport        = 'postMessage';
    556         $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
     555        $wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
     556        $wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
     557        $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
    557558}
    558559add_action( 'customize_register', 'twentythirteen_customize_register' );
    559560
     
    564565 * @since Twenty Thirteen 1.0
    565566 */
    566567function twentythirteen_customize_preview_js() {
    567         wp_enqueue_script( 'twentythirteen-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20130213', true );
     568        wp_enqueue_script( 'twentythirteen-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20130225', true );
    568569}
    569570add_action( 'customize_preview_init', 'twentythirteen_customize_preview_js' );
    570571
  • wp-content/themes/twentythirteen/js/theme-customizer.js

     
    1717                        $( '.site-description' ).text( to );
    1818                } );
    1919        } );
    20 } )( jQuery );
    21  No newline at end of file
     20        // Header text color
     21        wp.customize( 'header_textcolor', function( value ) {
     22                value.bind( function( to ) {
     23                        $( '.site-title a, .site-description' ).css( 'color',  to );
     24                } );
     25        } );
     26} )( jQuery );
  • wp-content/themes/twentythirteen/inc/custom-header.php

     
    114114        ?>
    115115                .site-title a,
    116116                .site-description {
    117                         color: #<?php echo esc_attr( $text_color ); ?> !important;
     117                        color: #<?php echo esc_attr( $text_color ); ?>;
    118118                }
    119119        <?php endif; ?>
    120120        </style>