"Trash" updates, props caesarsgrunt, see #4529

git-svn-id: https://develop.svn.wordpress.org/trunk@11841 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2009-08-19 08:35:24 +00:00
parent 34deab141b
commit 782977afbf
12 changed files with 54 additions and 24 deletions

View File

@@ -59,7 +59,7 @@ foreach ($posts_columns as $column_name => $column_display_name ) {
case 'cb':
?>
<th scope="row" class="check-column"><input type="checkbox" name="media[]" value="<?php the_ID(); ?>" /></th>
<th scope="row" class="check-column"><?php if ( current_user_can('edit_post', $post->ID) ) { ?><input type="checkbox" name="media[]" value="<?php the_ID(); ?>" /><?php } ?></th>
<?php
break;
@@ -89,9 +89,11 @@ foreach ($posts_columns as $column_name => $column_display_name ) {
<p>
<?php
$actions = array();
if ( $is_trash && current_user_can('delete_post', $post->ID) ) {
$actions['untrash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=untrash&amp;post=$post->ID", 'untrash-post_' . $post->ID) . "'>" . __('Restore') . "</a>";
$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
if ( $is_trash ) {
if ( current_user_can('delete_post', $post->ID) ) {
$actions['untrash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=untrash&amp;post=$post->ID", 'untrash-post_' . $post->ID) . "'>" . __('Restore') . "</a>";
$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
}
} else {
if ( current_user_can('edit_post', $post->ID) )
$actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>';