mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user