Allow filtering comments by user_id via URL. Props neoxx. Fixes #14163

git-svn-id: https://develop.svn.wordpress.org/trunk@15887 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
scribu
2010-10-21 14:03:25 +00:00
parent e93f819e09
commit a3ef15ffc0
2 changed files with 36 additions and 3 deletions
@@ -2093,6 +2093,8 @@ class WP_Comments_Table extends WP_List_Table {
$search = ( isset( $_REQUEST['s'] ) ) ? $_REQUEST['s'] : '';
$user_id = ( isset( $_REQUEST['user_id'] ) ) ? $_REQUEST['user_id'] : '';
$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 );
@@ -2113,6 +2115,7 @@ class WP_Comments_Table extends WP_List_Table {
$args = array(
'status' => isset( $status_map[$comment_status] ) ? $status_map[$comment_status] : $comment_status,
'search' => $search,
'user_id' => $user_id,
'offset' => $start,
'number' => $number,
'post_id' => $post_id,