WordPress.org

Make WordPress Core

Changeset 39144


Ignore:
Timestamp:
11/04/2016 08:53:56 PM (4 years ago)
Author:
westonruter
Message:

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.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/customize/class-wp-customize-selective-refresh.php

    r38967 r39144  
    189189                'clickEditTitle' => __( 'Click to edit the site title.' ),
    190190                'clickEditMisc' => __( 'Click to edit this element.' ),
    191                 'editShortcutVisibilityToggle'  => __( 'Toggle edit shortcuts' ),
    192191                /* translators: %s: document.write() */
    193192                'badDocumentWrite' => sprintf( __( '%s is forbidden' ), 'document.write()' ),
  • trunk/src/wp-includes/js/customize-selective-refresh.js

    r39136 r39144  
    10071007
    10081008        api.preview.bind( 'active', function() {
    1009             var body = $( document.body ), buttonText, $editShortcutVisibilityButton;
    1010 
    1011             // Add invisible button to toggle editShortcutVisibility.
    1012             if ( $( '.edit-shortcut-visibility-button' ).length < 1 ) {
    1013                 buttonText = self.data.l10n.editShortcutVisibilityToggle || 'Toggle edit shortcuts';
    1014                 $editShortcutVisibilityButton = $( '<button type="button" class="edit-shortcut-visibility-button screen-reader-text"></button>' );
    1015                 $editShortcutVisibilityButton.text( buttonText );
    1016                 $editShortcutVisibilityButton.on( 'click', function() {
    1017                     api.selectiveRefresh.editShortcutVisibility.set( 'visible' === api.selectiveRefresh.editShortcutVisibility.get() ? 'hidden' : 'visible' );
    1018                 } );
    1019                 body.prepend( $editShortcutVisibilityButton );
    1020             }
    10211009
    10221010            // Make all partials ready.
Note: See TracChangeset for help on using the changeset viewer.