diff --git a/wp-admin/includes/class-wp-comments-list-table.php b/wp-admin/includes/class-wp-comments-list-table.php index 24690d76f0..797936386c 100644 --- a/wp-admin/includes/class-wp-comments-list-table.php +++ b/wp-admin/includes/class-wp-comments-list-table.php @@ -60,6 +60,9 @@ class WP_Comments_List_Table extends WP_List_Table { $user_id = ( isset( $_REQUEST['user_id'] ) ) ? $_REQUEST['user_id'] : ''; + $orderby = ( isset( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : ''; + $order = ( isset( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : ''; + $comments_per_page = $this->get_items_per_page( 'edit_comments_per_page' ); $comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status ); @@ -76,7 +79,7 @@ class WP_Comments_List_Table extends WP_List_Table { 'moderated' => 'hold', 'approved' => 'approve' ); - + $args = array( 'status' => isset( $status_map[$comment_status] ) ? $status_map[$comment_status] : $comment_status, 'search' => $search, @@ -85,8 +88,8 @@ class WP_Comments_List_Table extends WP_List_Table { 'number' => $number, 'post_id' => $post_id, 'type' => $comment_type, - 'orderby' => @$_REQUEST['orderby'], - 'order' => @$_REQUEST['order'], + 'orderby' => $orderby, + 'order' => $order, ); $_comments = get_comments( $args );