Make WordPress Core

Changeset 30482


Ignore:
Timestamp:
11/20/2014 05:05:27 PM (10 years ago)
Author:
lancewillett
Message:

Twenty Twelve and Thirteen: Use proper way to get customizer settings values.

Props obenland, kdoran. Fixes #29577.

Location:
trunk/src/wp-content/themes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentythirteen/functions.php

    r30390 r30482  
    548548 */
    549549function twentythirteen_customize_preview_js() {
    550     wp_enqueue_script( 'twentythirteen-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20130226', true );
     550    wp_enqueue_script( 'twentythirteen-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20141120', true );
    551551}
    552552add_action( 'customize_preview_init', 'twentythirteen_customize_preview_js' );
  • trunk/src/wp-content/themes/twentythirteen/js/theme-customizer.js

    r29903 r30482  
    2222        value.bind( function( to ) {
    2323            if ( 'blank' == to ) {
    24                 if ( 'remove-header' == _wpCustomizeSettings.values.header_image )
     24                if ( 'remove-header' == wp.customize.instance( 'header_image' ).get() ) {
    2525                    $( '.home-link' ).css( 'min-height', '0' );
     26                }
    2627                $( '.site-title, .site-description' ).css( {
    2728                    'clip': 'rect(1px, 1px, 1px, 1px)',
  • trunk/src/wp-content/themes/twentytwelve/functions.php

    r29095 r30482  
    495495 */
    496496function twentytwelve_customize_preview_js() {
    497     wp_enqueue_script( 'twentytwelve-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20130301', true );
     497    wp_enqueue_script( 'twentytwelve-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20141120', true );
    498498}
    499499add_action( 'customize_preview_init', 'twentytwelve_customize_preview_js' );
  • trunk/src/wp-content/themes/twentytwelve/js/theme-customizer.js

    r29903 r30482  
    5454            var body = $( 'body' );
    5555
    56             if ( '' != to )
     56            if ( '' !== to ) {
    5757                body.removeClass( 'custom-background-empty custom-background-white' );
    58             else if ( 'rgb(255, 255, 255)' == body.css( 'background-color' ) )
     58            } else if ( 'rgb(255, 255, 255)' === body.css( 'background-color' ) ) {
    5959                body.addClass( 'custom-background-white' );
    60             else if ( 'rgb(230, 230, 230)' == body.css( 'background-color' ) && '' == _wpCustomizeSettings.values.background_color )
     60            } else if ( 'rgb(230, 230, 230)' === body.css( 'background-color' ) && '' === wp.customize.instance( 'background_color' ).get() ) {
    6161                body.addClass( 'custom-background-empty' );
     62            }
    6263        } );
    6364    } );
Note: See TracChangeset for help on using the changeset viewer.