CoreFiles by mySites.guru
customize-preview.js35 lines, 832 bytes, from wordpress-4.9.21.zip
Raw History Compare with 4.9.20
md5
e0d91074b5f13f0dcd4a34bcc561c329
sha1
ebffb6451aad22c880e489cbfa3dc921ab4016e6
sha256
74a8b1e448ce90c6e8bdbdd6d727a28245982611a50b8a6c4f966661f1b71151
/**
 * Live-update changed settings in real time in the Customizer preview.
 */

( function( $ ) {
	var $style = $( '#twentyfifteen-color-scheme-css' ),
		api = wp.customize;

	if ( ! $style.length ) {
		$style = $( 'head' ).append( '<style type="text/css" id="twentyfifteen-color-scheme-css" />' )
		                    .find( '#twentyfifteen-color-scheme-css' );
	}

	// Site title.
	api( 'blogname', function( value ) {
		value.bind( function( to ) {
			$( '.site-title a' ).text( to );
		} );
	} );

	// Site tagline.
	api( 'blogdescription', function( value ) {
		value.bind( function( to ) {
			$( '.site-description' ).text( to );
		} );
	} );

	// Color Scheme CSS.
	api.bind( 'preview-ready', function() {
		api.preview.bind( 'update-color-scheme-css', function( css ) {
			$style.html( css );
		} );
	} );

} )( jQuery );

The same content is in 416 releases, WordPress 4.1-RC2 to 5.0-beta4. See them all, or every version of this file.