diff --git a/src/wp-admin/css/customize-controls.css b/src/wp-admin/css/customize-controls.css index a753d2ef5b..a6625b5bfd 100644 --- a/src/wp-admin/css/customize-controls.css +++ b/src/wp-admin/css/customize-controls.css @@ -50,22 +50,12 @@ body { border-bottom: 1px solid #eeeeee; } -#customize-info.open .accordion-section-title, -#customize-info .accordion-section-title:hover, -#customize-info .accordion-section-title:focus { - color: #555555; -} - #customize-info.open .accordion-section-title:after, #customize-info .accordion-section-title:hover:after, #customize-info .accordion-section-title:focus:after { color: #555555; } -#customize-info.open .accordion-section-title { - border-color: transparent; -} - #customize-info .preview-notice { font-size: 13px; line-height: 24px; @@ -103,6 +93,9 @@ body { background: white; } +#customize-info.open .accordion-section-title, +#customize-info .accordion-section-title:hover, +#customize-info .accordion-section-title:focus, #customize-theme-controls .control-section:hover > .accordion-section-title, #customize-theme-controls .control-section .accordion-section-title:hover, #customize-theme-controls .control-section.open .accordion-section-title, @@ -125,6 +118,7 @@ body { color: #555555; } +#customize-info.open, #customize-theme-controls .control-section.open { border-bottom: 1px solid #eeeeee; } diff --git a/src/wp-admin/customize.php b/src/wp-admin/customize.php index 7d1aa47b58..50119cd12b 100644 --- a/src/wp-admin/customize.php +++ b/src/wp-admin/customize.php @@ -119,7 +119,7 @@ do_action( 'customize_controls_print_scripts' ); theme()->get_screenshot(); - $cannot_expand = ! ( $screenshot || $wp_customize->theme()->get('Description') ); + $cannot_expand = ! ( $wp_customize->is_theme_active() || $screenshot || $wp_customize->theme()->get('Description') ); ?>
@@ -127,19 +127,28 @@ do_action( 'customize_controls_print_scripts' );
' . $wp_customize->theme()->display('Name') . '' ); + if ( ! $wp_customize->is_theme_active() ) { + /* translators: %s is the theme name in the Customize/Live Preview pane */ + echo sprintf( __( 'You are previewing %s' ), '' . $wp_customize->theme()->display('Name') . '' ); + } else { + /* translators: %s is the site title in the Customize pane */ + echo sprintf( __( 'You are customizing %s' ), '' . get_bloginfo( 'name' ) . '' ); + } ?>
- - - + is_theme_active() ) : + if ( $screenshot ) : ?> + + - theme()->get('Description') ): ?> -
theme()->display('Description'); ?>
- + theme()->get('Description') ): ?> +
theme()->display('Description'); ?>
+
diff --git a/src/wp-admin/js/customize-controls.js b/src/wp-admin/js/customize-controls.js index 53a11678a6..a93d4fbee8 100644 --- a/src/wp-admin/js/customize-controls.js +++ b/src/wp-admin/js/customize-controls.js @@ -916,6 +916,7 @@ var previewer, parent, topFocus, body = $( document.body ), overlay = body.children( '.wp-full-overlay' ), + title = $( '#customize-info .theme-name.site-title' ), closeBtn = $( '.customize-controls-close' ), saveBtn = $( '#save' ); @@ -1112,6 +1113,13 @@ event.preventDefault(); }); + // Bind site title display to the corresponding field. + if ( title.length ) { + $( '#customize-control-blogname input' ).on( 'input', function() { + title.text( this.value ); + } ); + } + // Create a potential postMessage connection with the parent frame. parent = new api.Messenger({ url: api.settings.url.parent,