diff --git a/wp-content/themes/twentyseventeen/assets/js/customize-preview.js b/wp-content/themes/twentyseventeen/assets/js/customize-preview.js index e5d4ee16d7..dba7b79b9e 100644 --- a/wp-content/themes/twentyseventeen/assets/js/customize-preview.js +++ b/wp-content/themes/twentyseventeen/assets/js/customize-preview.js @@ -8,10 +8,10 @@ // Collect information from customize-controls.js about which panels are opening. wp.customize.bind( 'preview-ready', function() { - + // Initially hide the theme option placeholders on load $( '.panel-placeholder' ).hide(); - + wp.customize.preview.bind( 'section-highlight', function( data ) { // Only on the front page. @@ -58,8 +58,14 @@ clip: 'rect(1px, 1px, 1px, 1px)', position: 'absolute' }); + // Add class for different logo styles if title and description are hidden. $( 'body' ).addClass( 'title-tagline-hidden' ); } else { + + // Check if the text color has been removed and use default colors in theme stylesheet. + if ( ! to.length ) { + $( '#twentyseventeen-custom-header-styles' ).remove(); + } $( '.site-title, .site-description' ).css({ clip: 'auto', position: 'relative' @@ -67,6 +73,7 @@ $( '.site-branding, .site-branding a, .site-description, .site-description a' ).css({ color: to }); + // Add class for different logo styles if title and description are visible. $( 'body' ).removeClass( 'title-tagline-hidden' ); } }); diff --git a/wp-content/themes/twentyseventeen/inc/custom-header.php b/wp-content/themes/twentyseventeen/inc/custom-header.php index 42a89e93d8..92940a8caf 100644 --- a/wp-content/themes/twentyseventeen/inc/custom-header.php +++ b/wp-content/themes/twentyseventeen/inc/custom-header.php @@ -69,7 +69,7 @@ function twentyseventeen_header_style() { // If we get this far, we have custom styles. Let's do this. ?> -