Customize: Remove edit shortcut toggle button from preview since visibility is now linked with pane visibility.

Amends [39131].
Props westonruter, sirbrillig.
See #27403.
Fixes #38668.


git-svn-id: https://develop.svn.wordpress.org/trunk@39144 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter 2016-11-04 20:53:56 +00:00
parent 7435ecdce0
commit d616ad29a5
2 changed files with 0 additions and 13 deletions

View File

@ -188,7 +188,6 @@ final class WP_Customize_Selective_Refresh {
'clickEditWidget' => __( 'Click to edit this widget.' ),
'clickEditTitle' => __( 'Click to edit the site title.' ),
'clickEditMisc' => __( 'Click to edit this element.' ),
'editShortcutVisibilityToggle' => __( 'Toggle edit shortcuts' ),
/* translators: %s: document.write() */
'badDocumentWrite' => sprintf( __( '%s is forbidden' ), 'document.write()' ),
),

View File

@ -1006,18 +1006,6 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
} );
api.preview.bind( 'active', function() {
var body = $( document.body ), buttonText, $editShortcutVisibilityButton;
// Add invisible button to toggle editShortcutVisibility.
if ( $( '.edit-shortcut-visibility-button' ).length < 1 ) {
buttonText = self.data.l10n.editShortcutVisibilityToggle || 'Toggle edit shortcuts';
$editShortcutVisibilityButton = $( '<button type="button" class="edit-shortcut-visibility-button screen-reader-text"></button>' );
$editShortcutVisibilityButton.text( buttonText );
$editShortcutVisibilityButton.on( 'click', function() {
api.selectiveRefresh.editShortcutVisibility.set( 'visible' === api.selectiveRefresh.editShortcutVisibility.get() ? 'hidden' : 'visible' );
} );
body.prepend( $editShortcutVisibilityButton );
}
// Make all partials ready.
self.partial.each( function( partial ) {