public function queryFilter($query)
    {
        global $pagenow;

        if (!is_admin() || !$pagenow || $pagenow !== 'edit-comments.php' || !isset($_GET['post_type']) || !$_GET['post_type']) {
            return;
        }

        $query->set('post_type', $_GET['post_type']);
    }
public function queryFilter($query)
    {
        global $pagenow;

        if (!is_admin() || !$pagenow || $pagenow !== 'edit-comments.php' || !isset($_GET['post_type']) || !$_GET['post_type']) {
            return;
        }

        $query->set('post_type', $_GET['post_type']);
    }
public function queryFilter ( $ query ) { global $ pagenow ; if ( ! is_admin ( ) || ! $ pagenow || $ pagenow !== 'edit-comments.php' || ! isset ( $ _GET [ 'post_type' ] ) || ! $ _GET [ 'post_type' ] ) { return ; } $ query -> set ( 'post_type' , $ _GET [ 'post_type' ] ) ; }
Filter the wp query
@param  WP_Query $query
@return void
Filter the wp query