CoreFiles by mySites.guru
theme-customizer.js41 lines, 1,129 bytes, from wordpress-4.3.21.zip
Raw History Compare with 4.3.20
md5
37b882b9e5354553532455391abbed99
sha1
c638644975c1fcaa35b3e5b577a071eb80594e93
sha256
66f105394bed11615247cf25943c8787e022f109077ee3e9a3635a1c21467c14
/**
 * Customizer enhancements for a better user experience.
 *
 * Contains handlers to make Customizer preview reload changes asynchronously.
 * Things like site title and description changes.
 */

( function( $ ) {
	// Site title and description.
	wp.customize( 'blogname', function( value ) {
		value.bind( function( to ) {
			$( '.site-title' ).text( to );
		} );
	} );
	wp.customize( 'blogdescription', function( value ) {
		value.bind( function( to ) {
			$( '.site-description' ).text( to );
		} );
	} );
	// Header text color.
	wp.customize( 'header_textcolor', function( value ) {
		value.bind( function( to ) {
			if ( 'blank' == to ) {
				if ( 'remove-header' == wp.customize.instance( 'header_image' ).get() ) {
					$( '.home-link' ).css( 'min-height', '0' );
				}
				$( '.site-title, .site-description' ).css( {
					'clip': 'rect(1px, 1px, 1px, 1px)',
					'position': 'absolute'
				} );
			} else {
				$( '.home-link' ).css( 'min-height', '230px' );
				$( '.site-title, .site-description' ).css( {
					'clip': 'auto',
					'color': to,
					'position': 'relative'
				} );
			}
		} );
	} );
} )( jQuery );

The same content is in 138 releases, WordPress 4.1-RC1 to 4.3.35. See them all, or every version of this file.