WP::main( string|array $query_args = '' )

Sets up all of the variables required by the ClassicPress environment.


Description

The action ‘wp’ has one parameter that references the WP object. It allows for accessing the properties and methods to further manipulate the object.


Parameters

$query_args

(string|array) (Optional) Passed to parse_request().

Default value: ''


Source

File: wp-includes/class-wp.php

	public function main($query_args = '') {
		$this->init();
		$this->parse_request($query_args);
		$this->send_headers();
		$this->query_posts();
		$this->handle_404();
		$this->register_globals();

		/**
		 * Fires once the ClassicPress environment has been set up.
		 *
		 * @since WP-2.1.0
		 *
		 * @param WP $this Current ClassicPress environment instance (passed by reference).
		 */
		do_action_ref_array( 'wp', array( &$this ) );
	}


Changelog

Changelog
Version Description
WP-2.0.0 Introduced.