Make it possible to filter comment screen by post type; no UI. props johnbillion, c3mdigital. fixes #18596.
Built from https://develop.svn.wordpress.org/trunk@25526 git-svn-id: http://core.svn.wordpress.org/trunk@25446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d814ad50b3
commit
c7e2071893
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue