widgets_init action-hookWP 2.2.0

Fires after all default WordPress widgets have been registered.

Usage

add_action( 'widgets_init', 'wp_kama_widgets_init_action' );

/**
 * Function for `widgets_init` action-hook.
 * 
 * @return void
 */
function wp_kama_widgets_init_action(){

	// action...
}

Changelog

Since 2.2.0 Introduced.

Where the hook is called

wp_widgets_init()
widgets_init
wp-includes/widgets.php 1854
do_action( 'widgets_init' );

Where the hook is used in WordPress

wp-includes/class-wp-customize-widgets.php 104
add_action( 'widgets_init', array( $this, 'register_settings' ), 95 );
wp-includes/class-wp-widget-factory.php 32
add_action( 'widgets_init', array( $this, '_register_widgets' ), 100 );