From 92852af8354ec703041dad55edf0b2e5358e09a1 Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Tue, 12 Mar 2013 16:52:30 +0000 Subject: [PATCH] Twenty Thirteen: fix toggling header text display in Customizer. Props obenland, fixes #23722. git-svn-id: http://core.svn.wordpress.org/trunk@23670 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../themes/twentythirteen/inc/custom-header.php | 2 +- .../themes/twentythirteen/js/theme-customizer.js | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/wp-content/themes/twentythirteen/inc/custom-header.php b/wp-content/themes/twentythirteen/inc/custom-header.php index b6d829ac79..15fa5253e8 100644 --- a/wp-content/themes/twentythirteen/inc/custom-header.php +++ b/wp-content/themes/twentythirteen/inc/custom-header.php @@ -96,7 +96,7 @@ function twentythirteen_header_style() { ?> .site-title, .site-description { - position: absolute !important; + position: absolute; clip: rect(1px 1px 1px 1px); /* IE7 */ clip: rect(1px, 1px, 1px, 1px); } diff --git a/wp-content/themes/twentythirteen/js/theme-customizer.js b/wp-content/themes/twentythirteen/js/theme-customizer.js index be1b67b25b..d38ab2d65b 100644 --- a/wp-content/themes/twentythirteen/js/theme-customizer.js +++ b/wp-content/themes/twentythirteen/js/theme-customizer.js @@ -20,7 +20,21 @@ // Header text color. wp.customize( 'header_textcolor', function( value ) { value.bind( function( to ) { - $( '.site-title, .site-description' ).css( 'color', to ); + if ( 'blank' == to ) { + if ( 'remove-header' == _wpCustomizeSettings.values.header_image ) + $( '#masthead hgroup' ).css( 'min-height', '0' ); + $( '.site-title, .site-description' ).css( { + 'clip': 'rect(1px, 1px, 1px, 1px)', + 'position': 'absolute' + } ); + } else { + $( '#masthead hgroup' ).css( 'min-height', '230px' ); + $( '.site-title, .site-description' ).css( { + 'clip': 'auto', + 'color': to, + 'position': 'relative' + } ); + } } ); } ); } )( jQuery );