WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
класс не описан

Yoast\WP\SEO\Wrappers

WP_Query_Wrapper{} Yoast 1.0

Wrapper for WP_Query.

Хуков нет.

Возвращает

Null. Ничего.

Использование

$WP_Query_Wrapper = new WP_Query_Wrapper();
// use class methods

Методы

  1. get_main_query()
  2. get_query()
  3. reset_query()
  4. set_query( WP_Query $wp_query )

Код WP_Query_Wrapper{} Yoast 15.6.2

<?php
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_query( WP_Query $wp_query ) {
		$GLOBALS['wp_query'] = $wp_query;
	}

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