Surface "Move to Trash" link for posts/pages immediately after first autosave fires. Props cross country flight. fixes #10344
git-svn-id: http://svn.automattic.com/wordpress/trunk@11986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -183,9 +183,9 @@ if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
|
||||
<?php do_action('post_submitbox_start'); ?>
|
||||
<div id="delete-action">
|
||||
<?php
|
||||
if ( ( 'edit' == $action ) && current_user_can("delete_${post_type}", $post->ID) ) { ?>
|
||||
if ( current_user_can("delete_${post_type}", $post->ID) ) { ?>
|
||||
<?php $delete_url = add_query_arg( array('action'=>'trash', 'post'=>$post->ID) ); ?>
|
||||
<a class="submitdelete deletion" href="<?php echo wp_nonce_url($delete_url, "trash-${post_type}_" . $post->ID); ?>"><?php _e('Move to Trash'); ?></a>
|
||||
<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>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user