WordPress at a glance
action is not described

init action-hook . WP 1.5.0

Fires after WordPress has finished loading but before any headers are sent.

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.

Usage

add_action( 'init', 'action_function_name_3412' );
function action_function_name_3412(){
	// action...
}

Changelog

Since 1.5.0 Introduced.

Where the hook is called

In file: /wp-settings.php
init
wp-settings.php 540
do_action( 'init' );

Where in WP core the hook is used

wp-includes/blocks/archives.php 143
add_action( 'init', 'register_block_core_archives' );
wp-includes/blocks/block.php 48
add_action( 'init', 'register_block_core_block' );
wp-includes/blocks/calendar.php 78
add_action( 'init', 'register_block_core_calendar' );
wp-includes/blocks/categories.php 120
add_action( 'init', 'register_block_core_categories' );
wp-includes/blocks/latest-comments.php 196
add_action( 'init', 'register_block_core_latest_comments' );
wp-includes/blocks/latest-posts.php 248
add_action( 'init', 'register_block_core_latest_posts' );
wp-includes/blocks/rss.php 150
add_action( 'init', 'register_block_core_rss' );
wp-includes/blocks/search.php 98
add_action( 'init', 'register_block_core_search' );
wp-includes/blocks/shortcode.php 36
add_action( 'init', 'register_block_core_shortcode' );
wp-includes/blocks/social-link.php 50
add_action( 'init', 'register_block_core_social_link' );
wp-includes/blocks/tag-cloud.php 78
add_action( 'init', 'register_block_core_tag_cloud' );
wp-includes/class-wp-customize-manager.php 370
remove_action( 'init', 'wp_cron' );
wp-includes/class.wp-scripts.php 143
add_action( 'init', array( $this, 'init' ), 0 );
wp-includes/default-filters.php 447
add_action( 'init', 'rest_api_init' );
wp-includes/default-filters.php 532
add_action( 'init', 'wp_widgets_init', 1 );
wp-includes/default-filters.php 513
add_action( 'init', 'create_initial_taxonomies', 0 ); // Highest priority.
wp-includes/default-filters.php 489
add_action( 'init', 'kses_init' );
wp-includes/default-filters.php 475
add_action( 'init', 'create_initial_post_types', 0 ); // Highest priority.
wp-includes/default-filters.php 131
add_action( 'init', 'wp_init_targeted_link_rel_filters' );
wp-includes/default-filters.php 399
add_action( 'init', '_show_post_preview' );
wp-includes/default-filters.php 369
add_action( 'init', 'wp_schedule_delete_old_privacy_export_files' );
wp-includes/default-filters.php 349
add_action( 'init', 'smilies_init', 5 );
wp-includes/default-filters.php 331
add_action( 'init', 'wp_cron' );
wp-includes/default-filters.php 302
add_action( 'init', 'check_theme_switched', 99 );
wp-includes/ms-default-filters.php 16
add_action( 'init', 'ms_subdomain_constants' );
wp-includes/ms-default-filters.php 25
add_action( 'init', 'maybe_add_existing_user_to_blog' );
wp-includes/update.php 836
add_action( 'init', 'wp_schedule_update_checks' );