mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 02:10:45 +01:00
a7418e092e
Built from https://develop.svn.wordpress.org/trunk@30372 git-svn-id: http://core.svn.wordpress.org/trunk@30370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
34 lines
806 B
JavaScript
34 lines
806 B
JavaScript
/**
|
|
* 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 ); |