From 76cb40634b62a8eb379832e56901d6e61cb80148 Mon Sep 17 00:00:00 2001 From: Helen Hou-Sandi Date: Fri, 20 Sep 2013 20:15:51 +0000 Subject: [PATCH] Make it possible to filter comment screen by post type; no UI. props johnbillion, c3mdigital. fixes #18596. git-svn-id: https://develop.svn.wordpress.org/trunk@25526 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-comments-list-table.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-admin/includes/class-wp-comments-list-table.php b/src/wp-admin/includes/class-wp-comments-list-table.php index 23f3169d04..345bda2f5b 100644 --- a/src/wp-admin/includes/class-wp-comments-list-table.php +++ b/src/wp-admin/includes/class-wp-comments-list-table.php @@ -52,6 +52,8 @@ class WP_Comments_List_Table extends WP_List_Table { $search = ( isset( $_REQUEST['s'] ) ) ? $_REQUEST['s'] : ''; + $post_type = ( isset( $_REQUEST['post_type'] ) ) ? sanitize_key( $_REQUEST['post_type'] ) : ''; + $user_id = ( isset( $_REQUEST['user_id'] ) ) ? $_REQUEST['user_id'] : ''; $orderby = ( isset( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : ''; @@ -96,6 +98,7 @@ class WP_Comments_List_Table extends WP_List_Table { 'type' => $comment_type, 'orderby' => $orderby, 'order' => $order, + 'post_type' => $post_type, ); $_comments = get_comments( $args );