Twenty Twelve and Thirteen: Use proper way to get customizer settings values.
Props obenland, kdoran. Fixes #29577. git-svn-id: https://develop.svn.wordpress.org/trunk@30482 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9aa0e31b28
commit
fed984a90c
@ -547,6 +547,6 @@ add_action( 'customize_register', 'twentythirteen_customize_register' );
|
||||
* @since Twenty Thirteen 1.0
|
||||
*/
|
||||
function twentythirteen_customize_preview_js() {
|
||||
wp_enqueue_script( 'twentythirteen-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20130226', true );
|
||||
wp_enqueue_script( 'twentythirteen-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20141120', true );
|
||||
}
|
||||
add_action( 'customize_preview_init', 'twentythirteen_customize_preview_js' );
|
||||
|
@ -21,8 +21,9 @@
|
||||
wp.customize( 'header_textcolor', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
if ( 'blank' == to ) {
|
||||
if ( 'remove-header' == _wpCustomizeSettings.values.header_image )
|
||||
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'
|
||||
|
@ -494,6 +494,6 @@ add_action( 'customize_register', 'twentytwelve_customize_register' );
|
||||
* @since Twenty Twelve 1.0
|
||||
*/
|
||||
function twentytwelve_customize_preview_js() {
|
||||
wp_enqueue_script( 'twentytwelve-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20130301', true );
|
||||
wp_enqueue_script( 'twentytwelve-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20141120', true );
|
||||
}
|
||||
add_action( 'customize_preview_init', 'twentytwelve_customize_preview_js' );
|
||||
|
@ -53,12 +53,13 @@
|
||||
value.bind( function( to ) {
|
||||
var body = $( 'body' );
|
||||
|
||||
if ( '' != to )
|
||||
if ( '' !== to ) {
|
||||
body.removeClass( 'custom-background-empty custom-background-white' );
|
||||
else if ( 'rgb(255, 255, 255)' == body.css( 'background-color' ) )
|
||||
} else if ( 'rgb(255, 255, 255)' === body.css( 'background-color' ) ) {
|
||||
body.addClass( 'custom-background-white' );
|
||||
else if ( 'rgb(230, 230, 230)' == body.css( 'background-color' ) && '' == _wpCustomizeSettings.values.background_color )
|
||||
} else if ( 'rgb(230, 230, 230)' === body.css( 'background-color' ) && '' === wp.customize.instance( 'background_color' ).get() ) {
|
||||
body.addClass( 'custom-background-empty' );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
} )( jQuery );
|
||||
|
Loading…
Reference in New Issue
Block a user