2 * Theme Customizer enhancements for a better user experience.
4 * Contains handlers to make Theme Customizer preview reload changes asynchronously.
5 * Things like site title, description, and background color changes.
9 // Site title and description.
10 wp.customize( 'blogname', function( value ) {
11 value.bind( function( to ) {
12 $( '.site-title a' ).html( to );
15 wp.customize( 'blogdescription', function( value ) {
16 value.bind( function( to ) {
17 $( '.site-description' ).html( to );
21 // Hook into background color change and adjust body class value as needed.
22 wp.customize( 'background_color', function( value ) {
23 value.bind( function( to ) {
24 if ( '#ffffff' == to || '#fff' == to )
25 $( 'body' ).addClass( 'custom-background-white' );
27 $( 'body' ).addClass( 'custom-background-empty' );
29 $( 'body' ).removeClass( 'custom-background-empty custom-background-white' );