Editor: hide the Move to Trash link for auto-drafts until they are auto-saved.

Props iseulde.
Fixes #16116.

git-svn-id: https://develop.svn.wordpress.org/trunk@36972 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2016-03-12 17:21:52 +00:00
parent 9d753fbf5a
commit b68a4e3da6
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -374,6 +374,10 @@ jQuery(document).ready( function($) {
$( '.autosave-message' ).text( postL10n.savingText );
}).on( 'after-autosave.edit-post', function( event, data ) {
$( '.autosave-message' ).text( data.message );
if ( $( document.body ).hasClass( 'post-new-php' ) ) {
$( '.submitbox .submitdelete' ).show();
}
});
$(window).on( 'beforeunload.edit-post', function() {