Make WordPress Core


Ignore:
Timestamp:
10/01/2009 11:44:18 AM (16 years ago)
Author:
markjaquith
Message:

Surface "Move to Trash" link for posts/pages immediately after first autosave fires. Props cross country flight. fixes #10344

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/meta-boxes.php

    r11874 r11986  
    184184<div id="delete-action">
    185185<?php
    186 if ( ( 'edit' == $action ) && current_user_can("delete_${post_type}", $post->ID) ) { ?>
     186if ( current_user_can("delete_${post_type}", $post->ID) ) { ?>
    187187<?php $delete_url = add_query_arg( array('action'=>'trash', 'post'=>$post->ID) ); ?>
    188 <a class="submitdelete deletion" href="<?php echo wp_nonce_url($delete_url, "trash-${post_type}_" . $post->ID); ?>"><?php _e('Move to Trash'); ?></a>
     188<a class="submitdelete deletion<?php if ( 'edit' != $action ) { echo " hidden"; } ?>" href="<?php echo wp_nonce_url($delete_url, "trash-${post_type}_" . $post->ID); ?>"><?php _e('Move to Trash'); ?></a>
    189189<?php } ?>
    190190</div>
Note: See TracChangeset for help on using the changeset viewer.