diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index ca073a374e..8aa3693ea4 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -132,7 +132,7 @@ if ( isset($_GET['approved']) || isset($_GET['deleted']) || isset($_GET['trashed echo '
'; } if ( $untrashed > 0 ) { - printf( _n( '%s comment removed from the trash', '%s comments removed from the trash', $untrashed ), $untrashed ); + printf( _n( '%s comment restored from the trash', '%s comments restored from the trash', $untrashed ), $untrashed ); echo '
'; } if ( $deleted > 0 ) { diff --git a/wp-admin/edit-pages.php b/wp-admin/edit-pages.php index 032636fb9d..9933dd42f3 100644 --- a/wp-admin/edit-pages.php +++ b/wp-admin/edit-pages.php @@ -168,7 +168,7 @@ if ( isset($_GET['trashed']) && (int) $_GET['trashed'] ) { unset($_GET['trashed']); } if ( isset($_GET['untrashed']) && (int) $_GET['untrashed'] ) { - printf( _n( 'Page removed from the trash.', '%s pages removed from the trash.', $_GET['untrashed'] ), number_format_i18n( $_GET['untrashed'] ) ); + printf( _n( 'Page restored from the trash.', '%s pages restored from the trash.', $_GET['untrashed'] ), number_format_i18n( $_GET['untrashed'] ) ); unset($_GET['untrashed']); } $_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed'), $_SERVER['REQUEST_URI'] ); @@ -239,6 +239,8 @@ $page_links = paginate_links( array( 'current' => $pagenum )); +$is_trash = isset($_GET['post_status']) && $_GET['post_status'] == 'trash'; + if ( $page_links ) : ?>
' . __( 'Displaying %s–%s of %s' ) . '%s', number_format_i18n( ( $pagenum - 1 ) * $per_page + 1 ), @@ -251,7 +253,7 @@ if ( $page_links ) : ?>
- +
@@ -298,7 +300,7 @@ if ( $page_links )
- +
diff --git a/wp-admin/edit.php b/wp-admin/edit.php index d8239c9bff..b0227d7db9 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -24,7 +24,7 @@ if ( $_redirect = intval( max( @$_GET['p'], @$_GET['attachment_id'], @$_GET['pag if ( isset($_GET['doaction']) || isset($_GET['doaction2']) || isset($_GET['delete_all']) || isset($_GET['delete_all2']) ) { check_admin_referer('bulk-posts'); - if (isset($_GET['delete_all']) || isset($_GET['delete_all2'])) { + if ( isset($_GET['delete_all']) || isset($_GET['delete_all2']) ) { $post_status = $wpdb->escape($_GET['post_status']); $post_ids = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_type='post' AND post_status = '$post_status'" ); $doaction = 'delete'; @@ -166,15 +166,15 @@ if ( isset($_GET['deleted']) && (int) $_GET['deleted'] ) { if ( isset($_GET['trashed']) && (int) $_GET['trashed'] ) { printf( _n( 'Post moved to the trash.', '%s posts moved to the trash.', $_GET['trashed'] ), number_format_i18n( $_GET['trashed'] ) ); - unset($_GET['deleted']); + unset($_GET['trashed']); } if ( isset($_GET['untrashed']) && (int) $_GET['untrashed'] ) { - printf( _n( 'Post removed from the trash.', '%s posts removed from the trash.', $_GET['untrashed'] ), number_format_i18n( $_GET['untrashed'] ) ); + printf( _n( 'Post restored from the trash.', '%s posts restored from the trash.', $_GET['untrashed'] ), number_format_i18n( $_GET['untrashed'] ) ); unset($_GET['undeleted']); } -$_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated', 'deleted'), $_SERVER['REQUEST_URI'] ); +$_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed'), $_SERVER['REQUEST_URI'] ); ?>

@@ -232,12 +232,14 @@ $page_links = paginate_links( array( 'current' => $_GET['paged'] )); +$is_trash = isset($_GET['post_status']) && $_GET['post_status'] == 'trash'; + ?>
+if ( $is_trash && current_user_can('edit_others_posts') ) { ?>
@@ -325,7 +327,7 @@ if ( $page_links )
- +