mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-02 00:00:15 +00:00
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
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user