widgets_init
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
widgets_init
wp-includes/widgets.php 1858
do_action( 'widgets_init' );
Where the hook is used in WordPress
wp-includes/class-wp-customize-widgets.php 105
add_action( 'widgets_init', array( $this, 'register_settings' ), 95 );
wp-includes/class-wp-widget-factory.php 33
add_action( 'widgets_init', array( $this, '_register_widgets' ), 100 );
wp-includes/default-filters.php 653
add_action( 'widgets_init', '_wp_block_theme_register_classic_sidebars', 1 );