Changeset 39144
- Timestamp:
- 11/04/2016 08:53:56 PM (8 years ago)
- 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 189 189 'clickEditTitle' => __( 'Click to edit the site title.' ), 190 190 'clickEditMisc' => __( 'Click to edit this element.' ), 191 'editShortcutVisibilityToggle' => __( 'Toggle edit shortcuts' ),192 191 /* translators: %s: document.write() */ 193 192 'badDocumentWrite' => sprintf( __( '%s is forbidden' ), 'document.write()' ), -
trunk/src/wp-includes/js/customize-selective-refresh.js
r39136 r39144 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.
Note: See TracChangeset
for help on using the changeset viewer.