--- a/wp/wp-content/themes/twentytwelve/js/theme-customizer.js Mon Jun 08 16:11:51 2015 +0000
+++ b/wp/wp-content/themes/twentytwelve/js/theme-customizer.js Tue Jun 09 03:35:32 2015 +0200
@@ -1,7 +1,7 @@
/**
- * Theme Customizer enhancements for a better user experience.
+ * Customizer enhancements for a better user experience.
*
- * Contains handlers to make Theme Customizer preview reload changes asynchronously.
+ * Contains handlers to make Customizer preview reload changes asynchronously.
* Things like site title, description, and background color changes.
*/
@@ -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 );