wp-includes/class-wp.php:815Sets up all of the variables required by the WordPress environment.
$query_argsstring|arrayoptional''One hook fires while WP::main() runs, in this order:
Fires once the WordPress environment has been set up.
public function main( $query_args = '' ) { $this->init(); $parsed = $this->parse_request( $query_args ); if ( $parsed ) { $this->query_posts(); $this->handle_404(); $this->register_globals(); } $this->send_headers(); /** * Fires once the WordPress environment has been set up. * * @since 2.1.0 * * @param WP $wp Current WordPress environment instance (passed by reference). */ do_action_ref_array( 'wp', array( &$this ) ); }Introduced in 2.0.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/class-wp.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.