WordPress at a glance

wp() WP 1.0

Set up the WordPress query.

Возвращает

Null. Ничего.

Works based on: WP::main()

No Hooks.

Usage

wp( $query_vars );
$query_vars(string/array)
Default WP_Query arguments.
Default: ''

Notes

  • Global. WP. $wp Current WordPress environment instance.
  • Global. WP_Query. $wp_query WordPress Query object.
  • Global. WP_Query. $wp_the_query Copy of the WordPress Query object.

Список изменений

С версии 2.0.0 Введена.

Code of wp() WP 5.5.1

wp-includes/functions.php
<?php
function wp( $query_vars = '' ) {
	global $wp, $wp_query, $wp_the_query;

	$wp->main( $query_vars );

	if ( ! isset( $wp_the_query ) ) {
		$wp_the_query = $wp_query;
	}
}

Related Functions

From tag: query

More from category: Main Query

No comments
    Log In . Register