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

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

Description 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.

Top ↑

Parameters Parameters


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

Default value: ''

Top ↑

Source Source

File: wp-includes/class-wp.php

	public function main( $query_args = '' ) {
		$this->parse_request( $query_args );

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

Top ↑

Changelog Changelog

Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.