Changeset 41694
- Timestamp:
- 10/03/2017 12:21:06 AM (7 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-controls.js
r41679 r41694 6332 6332 6333 6333 api.section( 'publish_settings', function( section ) { 6334 var updateButtonsState, previewLinkControl, previewLinkControlId = 'changeset_preview_link', updateSectionActive, isSectionActive; 6334 var updateButtonsState, previewLinkControl, TrashControl, trashControlInstance, trashControlId = 'trash_changeset', previewLinkControlId = 'changeset_preview_link', updateSectionActive, isSectionActive; 6335 6336 TrashControl = api.Control.extend( { 6337 6338 // This is a temporary hack while waiting for richer JS templating and dynamic instantiation. 6339 embed: function() { 6340 var control = this; 6341 control.templateSelector = 'customize-trash-changeset-control'; 6342 return api.Control.prototype.embed.apply( control, arguments ); 6343 } 6344 } ); 6345 6346 trashControlInstance = new TrashControl( trashControlId, { 6347 params: { 6348 type: 'button', 6349 section: section.id, 6350 active: true, 6351 priority: 30, 6352 content: '<li id="customize-control-' + trashControlId + '" class="customize-control"></li>' 6353 } 6354 } ); 6355 api.control.add( trashControlId, trashControlInstance ); 6356 trashControlInstance.deferred.embedded.done( function() { 6357 trashControlInstance.container.find( 'button' ).on( 'click', function() { 6358 if ( confirm( api.l10n.trashConfirm ) ) { 6359 wp.customize.previewer.trash(); 6360 } 6361 } ); 6362 } ); 6335 6363 6336 6364 previewLinkControl = new api.PreviewLinkControl( previewLinkControlId, { -
trunk/src/wp-includes/class-wp-customize-manager.php
r41670 r41694 3640 3640 </script> 3641 3641 <script type="text/html" id="tmpl-customize-trash-changeset-control"> 3642 <button type="button" class="button-link button-link-delete"><?php _e( ' Trash unpublished changes' ); ?></button>3642 <button type="button" class="button-link button-link-delete"><?php _e( 'Discard changes' ); ?></button> 3643 3643 </script> 3644 3644 <?php -
trunk/src/wp-includes/script-loader.php
r41667 r41694 575 575 'themePreviewWait' => __( 'Setting up your live preview. This may take a bit.' ), 576 576 'revertingChanges' => __( 'Reverting unpublished changes…' ), 577 'trashConfirm' => __( 'Are you sure you would like to discard your unpublished changes?' ),577 'trashConfirm' => __( 'Are you sure you’d like to discard your unpublished changes?' ), 578 578 /* translators: %s: URL to the Customizer to load the autosaved version */ 579 579 'autosaveNotice' => __( 'There is a more recent autosave of your changes than the one you are previewing. <a href="%s">Restore the autosave</a>' ),
Note: See TracChangeset
for help on using the changeset viewer.