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..4da8291 100644
|
|
|
4764 | 4764 | api.trigger( 'pane-contents-reflowed' ); |
4765 | 4765 | }, api ); |
4766 | 4766 | |
| 4767 | /** |
| 4768 | * Get whether mobile screen dimensions. |
| 4769 | * |
| 4770 | * @since 4.7.0 |
| 4771 | * @access public |
| 4772 | * |
| 4773 | * @returns {boolean} Is mobile. |
| 4774 | */ |
| 4775 | api.isMobileScreen = function isMobileScreen() { |
| 4776 | if ( window.matchMedia ) { |
| 4777 | return window.matchMedia( 'screen and ( max-width: 640px )' ).matches; |
| 4778 | } else { |
| 4779 | return $( window ).width() <= 640; |
| 4780 | } |
| 4781 | }; |
| 4782 | |
4767 | 4783 | $( function() { |
4768 | 4784 | api.settings = window._wpCustomizeSettings; |
4769 | 4785 | api.l10n = window._wpCustomizeControlsL10n; |
… |
… |
|
5207 | 5223 | expandedPanel( false ); |
5208 | 5224 | expandedSection( false ); |
5209 | 5225 | previewerAlive( true ); |
5210 | | editShortcutVisibility( 'initial' ); |
| 5226 | editShortcutVisibility( api.isMobileScreen() ? 'visible' : 'hidden' ); |
5211 | 5227 | |
5212 | 5228 | api.bind( 'change', function() { |
5213 | 5229 | state('saved').set( false ); |
… |
… |
|
5813 | 5829 | }); |
5814 | 5830 | |
5815 | 5831 | // Update the edit shortcut visibility state. |
| 5832 | api.state( 'paneVisible' ).bind( function( isPaneVisible ) { |
| 5833 | api.state( 'editShortcutVisibility' ).set( isPaneVisible || api.isMobileScreen() ? 'visible' : 'hidden' ); |
| 5834 | } ); |
| 5835 | if ( window.matchMedia ) { |
| 5836 | window.matchMedia( 'screen and ( max-width: 640px )' ).addListener( function() { |
| 5837 | var state = api.state( 'paneVisible' ); |
| 5838 | state.callbacks.fireWith( state, [ state.get(), state.get() ] ); |
| 5839 | } ); |
| 5840 | } |
5816 | 5841 | api.previewer.bind( 'edit-shortcut-visibility', function( visibility ) { |
5817 | 5842 | api.state( 'editShortcutVisibility' ).set( visibility ); |
5818 | 5843 | } ); |
diff --git src/wp-includes/js/customize-selective-refresh.js src/wp-includes/js/customize-selective-refresh.js
index 0fc06e9..473c1e3 100644
|
|
wp.customize.selectiveRefresh = ( function( $, api ) { |
1022 | 1022 | self.partial.bind( 'add', function( partial ) { |
1023 | 1023 | partial.deferred.ready.resolve(); |
1024 | 1024 | } ); |
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 | 1025 | } ); |
1034 | 1026 | |
1035 | 1027 | } ); |
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' ), |