wp
Fires once the WordPress environment has been set up.
Usage
add_action( 'wp', 'wp_kama_wp_action' ); /** * Function for `wp` action-hook. * * @param WP $wp Current WordPress environment instance (passed by reference). * * @return void */ function wp_kama_wp_action( $wp ){ // action... }
- $wp(WP)
- Current WordPress environment instance (passed by reference).
Changelog
Since 2.1.0 | Introduced. |
Where the hook is called
wp
wp-includes/class-wp.php 830
do_action_ref_array( 'wp', array( &$this ) );
Where the hook is used in WordPress
wp-includes/class-wp-customize-widgets.php 357
add_action( 'wp', array( $this, 'customize_register' ) );