Make WordPress Core

Changeset 36972


Ignore:
Timestamp:
03/12/2016 05:21:52 PM (8 years ago)
Author:
azaozz
Message:

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

Props iseulde.
Fixes #16116.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/edit.css

    r36934 r36972  
    133133    text-decoration: none;
    134134    padding: 1px 2px;
     135}
     136
     137body.post-new-php .submitbox .submitdelete {
     138    display: none;
    135139}
    136140
  • trunk/src/wp-admin/js/post.js

    r36286 r36972  
    375375    }).on( 'after-autosave.edit-post', function( event, data ) {
    376376        $( '.autosave-message' ).text( data.message );
     377
     378        if ( $( document.body ).hasClass( 'post-new-php' ) ) {
     379            $( '.submitbox .submitdelete' ).show();
     380        }
    377381    });
    378382
Note: See TracChangeset for help on using the changeset viewer.