diff --git a/src/wp-admin/css/customize-controls.css b/src/wp-admin/css/customize-controls.css index 3e35b7eaa9..bcaf51913c 100644 --- a/src/wp-admin/css/customize-controls.css +++ b/src/wp-admin/css/customize-controls.css @@ -41,6 +41,10 @@ body { border-bottom: 1px solid #ddd; } +#customize-header-actions .secondary-actions { + display: none; +} + #customize-controls .wp-full-overlay-sidebar-content { overflow-y: auto; overflow-x: hidden; @@ -193,6 +197,7 @@ body { width: 100%; } +.customize-close-overlay, .customize-controls-close { display: block; position: absolute; @@ -202,6 +207,7 @@ body { height: 45px; padding-right: 2px; background: #eee; + border: none; border-right: 1px solid #ddd; color: #444; cursor: pointer; @@ -209,6 +215,11 @@ body { transition: color .1s ease-in-out, background .1s ease-in-out; } +.customize-close-overlay { + left: auto; + right: 0; +} + .control-panel-back { display: block; position: fixed; @@ -229,6 +240,8 @@ body { display: none; } +.customize-close-overlay:focus, +.customize-close-overlay:hover, .customize-controls-close:focus, .customize-controls-close:hover, .control-panel-back:focus, @@ -251,6 +264,13 @@ body { left: 13px; } +.customize-close-overlay:before { + font: normal 22px/1 dashicons; + content: "\f335"; + position: relative; + top: 3px; +} + .control-panel-back:before { font: normal 20px/1 dashicons; content: "\f341"; @@ -1127,6 +1147,14 @@ body.cheatin p { margin-bottom: 4px; } + .adding-widget #customize-header-actions .primary-actions { + display: none; + } + + .adding-widget #customize-header-actions .secondary-actions { + display: block; + } + #customize-header-actions .button-primary { margin-top: 6px; } diff --git a/src/wp-admin/customize.php b/src/wp-admin/customize.php index c341e4c35d..8c6eb67fd0 100644 --- a/src/wp-admin/customize.php +++ b/src/wp-admin/customize.php @@ -119,19 +119,26 @@ do_action( 'customize_controls_print_scripts' );
- is_theme_active() ? __( 'Save & Publish' ) : __( 'Save & Activate' ); - submit_button( $save_text, 'primary save', 'save', false ); - ?> - - - - - - - - - +
+ is_theme_active() ? __( 'Save & Publish' ) : __( 'Save & Activate' ); + submit_button( $save_text, 'primary save', 'save', false ); + ?> + + + + + + + + + +
+
+ +
diff --git a/src/wp-admin/js/customize-widgets.js b/src/wp-admin/js/customize-widgets.js index ab89adf84f..7910d09d18 100644 --- a/src/wp-admin/js/customize-widgets.js +++ b/src/wp-admin/js/customize-widgets.js @@ -177,7 +177,7 @@ // If the available widgets panel is open and the customize controls are // interacted with (i.e. available widgets panel is blurred) then close the // available widgets panel. - $( '#customize-controls' ).on( 'click keydown', function( e ) { + $( '#customize-controls, .customize-close-overlay' ).on( 'click keydown', function( e ) { var isAddNewBtn = $( e.target ).is( '.add-new-widget, .add-new-widget *' ); if ( $( 'body' ).hasClass( 'adding-widget' ) && ! isAddNewBtn ) { self.close();