2012-11-28 22:51:38 +00:00
|
|
|
/**
|
|
|
|
* Theme Customizer enhancements for a better user experience.
|
|
|
|
*
|
|
|
|
* Contains handlers to make Theme Customizer preview reload changes asynchronously.
|
|
|
|
*/
|
|
|
|
|
|
|
|
( function( $ ) {
|
|
|
|
// Site title and description.
|
|
|
|
wp.customize( 'blogname', function( value ) {
|
|
|
|
value.bind( function( to ) {
|
2013-05-08 11:27:48 +00:00
|
|
|
$( '.site-title a' ).text( to );
|
2012-11-28 22:51:38 +00:00
|
|
|
} );
|
|
|
|
} );
|
|
|
|
wp.customize( 'blogdescription', function( value ) {
|
|
|
|
value.bind( function( to ) {
|
2013-02-07 18:50:34 +00:00
|
|
|
$( '.site-description' ).text( to );
|
2012-11-28 22:51:38 +00:00
|
|
|
} );
|
|
|
|
} );
|
2013-03-05 00:13:56 +00:00
|
|
|
// Header text color.
|
|
|
|
wp.customize( 'header_textcolor', function( value ) {
|
|
|
|
value.bind( function( to ) {
|
2013-07-14 06:38:08 +00:00
|
|
|
if ( 'blank' === to ) {
|
2013-04-22 15:47:14 +00:00
|
|
|
$( '.site-title, .site-description' ).css( {
|
|
|
|
'clip': 'rect(1px, 1px, 1px, 1px)',
|
|
|
|
'position': 'absolute'
|
|
|
|
} );
|
|
|
|
} else {
|
|
|
|
$( '.site-title, .site-description' ).css( {
|
|
|
|
'clip': 'auto',
|
|
|
|
'color': to,
|
|
|
|
'position': 'relative'
|
|
|
|
} );
|
|
|
|
}
|
2013-03-05 00:13:56 +00:00
|
|
|
} );
|
|
|
|
} );
|
2013-07-14 06:38:08 +00:00
|
|
|
} )( jQuery );
|