From 523e35615c3f32c066b528ff6e6a739c57af4a0e Mon Sep 17 00:00:00 2001 From: scribu Date: Sat, 18 Sep 2010 19:51:53 +0000 Subject: [PATCH] Map 'approved' comment view to 'approve' comment status. See #14579 git-svn-id: https://develop.svn.wordpress.org/trunk@15633 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/default-list-tables.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/default-list-tables.php b/wp-admin/includes/default-list-tables.php index fc546541d8..f377659cf9 100644 --- a/wp-admin/includes/default-list-tables.php +++ b/wp-admin/includes/default-list-tables.php @@ -2071,8 +2071,13 @@ class WP_Comments_Table extends WP_List_Table { $start = $offset = ( $page - 1 ) * $comments_per_page; + $status_map = array( + 'moderated' => 'hold', + 'approved' => 'approve' + ); + $args = array( - 'status' => ( 'moderated' == $comment_status ) ? 'hold' : $comment_status, // TODO: replace all instances of 'moderated' with 'hold' + 'status' => isset( $status_map[$comment_status] ) ? $status_map[$comment_status] : $comment_status, 'search' => $search, 'offset' => $start, 'number' => $number,