Make WordPress Core

Ticket #38668: 38668.1.diff

File 38668.1.diff, 1.2 KB (added by westonruter, 9 years ago)
  • src/wp-includes/js/customize-selective-refresh.js

    diff --git src/wp-includes/js/customize-selective-refresh.js src/wp-includes/js/customize-selective-refresh.js
    index 2b8cbef..70e2b96 100644
    wp.customize.selectiveRefresh = ( function( $, api ) { 
    10061006                } );
    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.
    10231011                        self.partial.each( function( partial ) {