C:\xampp\htdocs\landing\wp-content\plugins\wordpress-seo\src\wrappers\wp-query-wrapper.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php

namespace Yoast\WP\SEO\Wrappers;

use 
WP_Query;

/**
 * Wrapper for WP_Query.
 */
class WP_Query_Wrapper {

    
/**
     * Returns the global WP_Query object.
     *
     * @return WP_Query The WP_Query object.
     */
    
public function get_query() {
        return 
$GLOBALS['wp_query'];
    }

    
/**
     * Returns the global main WP_Query object.
     *
     * @return WP_Query The WP_Query object.
     */
    
public function get_main_query() {
        return 
$GLOBALS['wp_the_query'];
    }

    
/**
     * Sets the global WP_Query object.
     *
     * @param WP_Query $wp_query The WP Query.
     */
    
public function set_queryWP_Query $wp_query ) {
        
$GLOBALS['wp_query'] = $wp_query;
    }

    
/**
     * Resets the global WP_Query object.
     */
    
public function reset_query() {
        \
wp_reset_query();
    }
}
x

Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586