diff --git src/wp-admin/customize.php src/wp-admin/customize.php
index 89d385d..eea5ddc 100644
|
|
do_action( 'customize_controls_print_scripts' ); |
192 | 192 | <?php endforeach; ?> |
193 | 193 | </div> |
194 | 194 | <?php endif; ?> |
195 | | <button type="button" class="collapse-sidebar button" aria-expanded="true" aria-label="<?php esc_attr_e( 'Collapse Sidebar' ); ?>"> |
| 195 | <button type="button" class="collapse-sidebar button" aria-expanded="true" aria-label="<?php esc_attr_e( 'Hide Controls' ); ?>"> |
196 | 196 | <span class="collapse-sidebar-arrow"></span> |
197 | | <span class="collapse-sidebar-label"><?php _e( 'Collapse' ); ?></span> |
| 197 | <span class="collapse-sidebar-label"><?php _e( 'Hide Controls' ); ?></span> |
198 | 198 | </button> |
199 | 199 | </div> |
200 | 200 | </form> |
diff --git src/wp-admin/js/customize-controls.js src/wp-admin/js/customize-controls.js
index 39f1b4f..811d3ab 100644
|
|
|
5207 | 5207 | expandedPanel( false ); |
5208 | 5208 | expandedSection( false ); |
5209 | 5209 | previewerAlive( true ); |
5210 | | editShortcutVisibility( 'initial' ); |
| 5210 | editShortcutVisibility( 'visible' ); |
5211 | 5211 | |
5212 | 5212 | api.bind( 'change', function() { |
5213 | 5213 | state('saved').set( false ); |
… |
… |
|
5813 | 5813 | }); |
5814 | 5814 | |
5815 | 5815 | // Update the edit shortcut visibility state. |
| 5816 | api.state( 'paneVisible' ).bind( function( isPaneVisible ) { |
| 5817 | var isMobileScreen; |
| 5818 | if ( window.matchMedia ) { |
| 5819 | isMobileScreen = window.matchMedia( 'screen and ( max-width: 640px )' ).matches; |
| 5820 | } else { |
| 5821 | isMobileScreen = $( window ).width() <= 640; |
| 5822 | } |
| 5823 | api.state( 'editShortcutVisibility' ).set( isPaneVisible || isMobileScreen ? 'visible' : 'hidden' ); |
| 5824 | } ); |
| 5825 | if ( window.matchMedia ) { |
| 5826 | window.matchMedia( 'screen and ( max-width: 640px )' ).addListener( function() { |
| 5827 | var state = api.state( 'paneVisible' ); |
| 5828 | state.callbacks.fireWith( state, [ state.get(), state.get() ] ); |
| 5829 | } ); |
| 5830 | } |
5816 | 5831 | api.previewer.bind( 'edit-shortcut-visibility', function( visibility ) { |
5817 | 5832 | api.state( 'editShortcutVisibility' ).set( visibility ); |
5818 | 5833 | } ); |
diff --git src/wp-includes/css/customize-preview.css src/wp-includes/css/customize-preview.css
index a388488..fee3b7b 100644
|
|
body.customize-partial-edit-shortcuts-hidden .customize-partial-edit-shortcut:be |
80 | 80 | pointer-events: none; |
81 | 81 | } |
82 | 82 | |
83 | | body.customize-partial-edit-shortcuts-flash .customize-partial-edit-shortcut:before { |
84 | | animation-duration: 1.5s; |
85 | | animation-delay: 0.4s; |
86 | | animation-name: customize-partial-edit-shortcut-bounce-disappear; |
87 | | pointer-events: none; |
88 | | } |
89 | | |
90 | 83 | .page-sidebar-collapsed .customize-partial-edit-shortcut:before, |
91 | 84 | .customize-partial-edit-shortcut-hidden:before { |
92 | 85 | visibility: hidden; |
diff --git src/wp-includes/js/customize-selective-refresh.js src/wp-includes/js/customize-selective-refresh.js
index 0fc06e9..bfbb2ef 100644
|
|
wp.customize.selectiveRefresh = ( function( $, api ) { |
996 | 996 | shouldAnimateHide = ( 'hidden' === visibility && body.hasClass( 'customize-partial-edit-shortcuts-shown' ) && ! body.hasClass( 'customize-partial-edit-shortcuts-hidden' ) ); |
997 | 997 | body.toggleClass( 'customize-partial-edit-shortcuts-hidden', shouldAnimateHide ); |
998 | 998 | body.toggleClass( 'customize-partial-edit-shortcuts-shown', 'visible' === visibility ); |
999 | | body.toggleClass( 'customize-partial-edit-shortcuts-flash', 'initial' === visibility ); |
1000 | 999 | } ); |
1001 | 1000 | |
1002 | 1001 | api.preview.bind( 'active', function() { |
… |
… |
wp.customize.selectiveRefresh = ( function( $, api ) { |
1022 | 1021 | self.partial.bind( 'add', function( partial ) { |
1023 | 1022 | partial.deferred.ready.resolve(); |
1024 | 1023 | } ); |
1025 | | |
1026 | | body.on( 'click', function( event ) { |
1027 | | if ( event.shiftKey || $( event.target ).is( '.customize-partial-edit-shortcut, :input, button *, a[href], a[href] *, object, object *, [tabindex], [tabindex] *' ) ) { |
1028 | | return; // Don't toggle shortcuts on shift-clicks or clicks on (or in) interactive elements. |
1029 | | } |
1030 | | api.selectiveRefresh.editShortcutVisibility.set( 'visible' === api.selectiveRefresh.editShortcutVisibility.get() ? 'hidden' : 'visible' ); |
1031 | | api.preview.send( 'edit-shortcut-visibility', api.selectiveRefresh.editShortcutVisibility.get() ); |
1032 | | } ); |
1033 | 1024 | } ); |
1034 | 1025 | |
1035 | 1026 | } ); |
diff --git src/wp-includes/script-loader.php src/wp-includes/script-loader.php
index 378ce1a..78a18a0 100644
|
|
function wp_default_scripts( &$scripts ) { |
465 | 465 | 'notAllowed' => __( 'Sorry, you are not allowed to customize this site.' ), |
466 | 466 | 'previewIframeTitle' => __( 'Site Preview' ), |
467 | 467 | 'loginIframeTitle' => __( 'Session expired' ), |
468 | | 'collapseSidebar' => __( 'Collapse Sidebar' ), |
469 | | 'expandSidebar' => __( 'Expand Sidebar' ), |
| 468 | 'collapseSidebar' => __( 'Hide Controls' ), |
| 469 | 'expandSidebar' => __( 'Show Controls' ), |
470 | 470 | 'untitledBlogName' => __( '(Untitled)' ), |
471 | 471 | // Used for overriding the file types allowed in plupload. |
472 | 472 | 'allowedFiles' => __( 'Allowed Files' ), |