src/Handlers/General.php
public function add_query()
    {
        global $wp_query;

        if (! $wp_query instanceof WP_Query) {
            return [];
        }

        $output  = \get_object_vars($wp_query);

        $output['query_vars'] = \array_filter($output['query_vars']);

        unset($output['posts'], $output['post']);

        return \array_filter($output);
    }
public function add_query()
    {
        global $wp_query;

        if (! $wp_query instanceof WP_Query) {
            return [];
        }

        $output  = \get_object_vars($wp_query);

        $output['query_vars'] = \array_filter($output['query_vars']);

        unset($output['posts'], $output['post']);

        return \array_filter($output);
    }
public function add_query ( ) { global $ wp_query ; if ( ! $ wp_query instanceof WP_Query ) { return [ ] ; } $ output = \ get_object_vars ( $ wp_query ) ; $ output [ 'query_vars' ] = \ array_filter ( $ output [ 'query_vars' ] ) ; unset ( $ output [ 'posts' ] , $ output [ 'post' ] ) ; return \ array_filter ( $ output ) ; }
Add the WP_Query global to Whoops data list.

@since  1.0.0

@return  array
Add the WP_Query global to Whoops data list .