do_action_ref_array( 'wp', WP $wp )
Fires once the WordPress environment has been set up.
Parameters
-
$wp
WP -
Current WordPress environment instance (passed by reference).
More Information
The $wp object is passed to the hooked function as a reference (no return is necessary).
This hook is one effective place to perform any high-level filtering or validation, following queries, but before WordPress does any routing, processing, or handling. It is run in the main() WP method in which the $query_args are passed to parse_request(), as well as when send_headers() , query_posts() , handle_404(), and register_globals() are setup.
Source
File: wp-includes/class-wp.php
.
View all references
do_action_ref_array( 'wp', array( &$this ) );
Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
This action will allow us to set a cookie in the headers but still have access to the WP class object. This example will show you how to set a cookie if you are on a specific page ID.