mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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. Built from https://develop.svn.wordpress.org/trunk@39144 git-svn-id: http://core.svn.wordpress.org/trunk@39084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ec82f421ad
commit
8f9f75598b
@ -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()' ),
|
||||
),
|
||||
|
@ -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 ) {
|
||||
|
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-beta2-39143';
|
||||
$wp_version = '4.7-beta2-39144';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user