CoreFiles by mySites.guru
customize-preview.js34 lines, 807 bytes, from wordpress-4.1-beta1.zip
Raw History Compare with 4.0-beta4
md5
2ffac61476092863f15e304ca6427872
sha1
7e6d535e653038c438416677e8055e4e808c362a
sha256
a63ecb13c4aba8675a2ee599916f5fddbc55afb68a1b487eb38d897a033d559b
/**
 * Live-update changed settings in real time in the Customizer preview. 
 */

( function( $ ) {
	var $style = $( '#twentyfifteen-color-scheme-css' );

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

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

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

	// Color Scheme CSS.
	wp.customize( 'color_scheme_css', function( value ) {
		value.bind( function( to ) {
			$style.html( to );
		} );
	} );

} )( jQuery );

No other release has this exact content. See every version of this file.