init action-hookWP-CLI 1.0

This is a WordPress - init hook. The plugin just uses it.

Most of WP is loaded at this stage, and the user is authenticated. WP continues to load on the init hook that follows (e.g. widgets), and many plugins instantiate themselves on it for all sorts of reasons (e.g. they need a user, a taxonomy, etc.).

If you wish to plug an action once WP is loaded, use the wp_loaded hook below.


add_action( 'init', 'wp_kama_init_action' );

 * Function for `init` action-hook.
 * @return void
function wp_kama_init_action(){

	// action...

Where the hook is called

In file: /php/wp-settings-cli.php

Where the hook is used in WP CLI

wp-cli/php/WP_CLI/Runner.php 1489
remove_action( 'init', 'wp_cron' );
wp-cli/php/WP_CLI/Runner.php 1626
add_action( 'init', 'kses_remove_filters', 11 );