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 ) { |
1006 | 1006 | } ); |
1007 | 1007 | |
1008 | 1008 | 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 | | } |
1021 | 1009 | |
1022 | 1010 | // Make all partials ready. |
1023 | 1011 | self.partial.each( function( partial ) { |