Deletion link should always show

git-svn-id: http://svn.automattic.com/wordpress/trunk@13905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2010-03-31 20:13:04 +00:00
parent db03ca0c13
commit fb96ce358a

View File

@ -195,13 +195,13 @@ if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
<?php
if ( current_user_can( "delete_post", $post->ID ) ) {
if ( !EMPTY_TRASH_DAYS ) {
$delete_url = wp_nonce_url( add_query_arg( array('action' => 'delete', 'post' => $post->ID) ), "delete-${post_type}_{$post->ID}" );
$delete_url = wp_nonce_url( add_query_arg( array('action' => 'delete', 'post' => $post->ID), admin_url( 'post.php' ) ), "delete-${post_type}_{$post->ID}" );
$delete_text = __('Delete Permanently');
} else {
$delete_url = wp_nonce_url( add_query_arg( array('action' => 'trash', 'post' => $post->ID) ), "trash-${post_type}_{$post->ID}" );
$delete_url = wp_nonce_url( add_query_arg( array('action' => 'trash', 'post' => $post->ID), admin_url( 'post.php' ) ), "trash-${post_type}_{$post->ID}" );
$delete_text = __('Move to Trash');
} ?>
<a class="submitdelete deletion<?php if ( 'edit' != $action ) { echo " hidden"; } ?>" href="<?php echo $delete_url; ?>"><?php echo $delete_text; ?></a><?php
<a class="submitdelete deletion" href="<?php echo $delete_url; ?>"><?php echo $delete_text; ?></a><?php
} ?>
</div>