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

Props obenland, kdoran. Fixes #29577.
Built from https://develop.svn.wordpress.org/trunk@30482


git-svn-id: http://core.svn.wordpress.org/trunk@30470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Lance Willett 2014-11-20 17:06:23 +00:00
parent 6c70cd9951
commit 330e97d663
2 changed files with 5 additions and 4 deletions

View File

@ -494,6 +494,6 @@ add_action( 'customize_register', 'twentytwelve_customize_register' );
* @since Twenty Twelve 1.0
*/
function twentytwelve_customize_preview_js() {
wp_enqueue_script( 'twentytwelve-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20130301', true );
wp_enqueue_script( 'twentytwelve-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20141120', true );
}
add_action( 'customize_preview_init', 'twentytwelve_customize_preview_js' );

View File

@ -53,12 +53,13 @@
value.bind( function( to ) {
var body = $( 'body' );
if ( '' != to )
if ( '' !== to ) {
body.removeClass( 'custom-background-empty custom-background-white' );
else if ( 'rgb(255, 255, 255)' == body.css( 'background-color' ) )
} else if ( 'rgb(255, 255, 255)' === body.css( 'background-color' ) ) {
body.addClass( 'custom-background-white' );
else if ( 'rgb(230, 230, 230)' == body.css( 'background-color' ) && '' == _wpCustomizeSettings.values.background_color )
} else if ( 'rgb(230, 230, 230)' === body.css( 'background-color' ) && '' === wp.customize.instance( 'background_color' ).get() ) {
body.addClass( 'custom-background-empty' );
}
} );
} );
} )( jQuery );