widgets_init

The BuddyPress widgets init hook.

Description

add_action( 'widgets_init', (string) $bp_dtheme_widgets_init ); 

Parameters (1)

0. $bp_dtheme_widgets_init (string) => 'bp_dtheme_widgets_init'
The bp dtheme widgets init.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'widgets_init', $bp_dtheme_widgets_init ); 
The following example is for adding a hook callback.
  1. // define the widgets_init callback 
  2. function action_widgets_init( $bp_dtheme_widgets_init ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'widgets_init', 'action_widgets_init', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'widgets_init', 'action_widgets_init', 10, 1 ); 

Defined (10)

The action is defined in the following location(s).

/bp-themes/bp-default/functions.php  
  1. add_action( 'widgets_init', 'bp_dtheme_widgets_init' ); 
/bp-messages/bp-messages-widgets.php  
  1. add_action( 'widgets_init', function() { register_widget( 'BP_Messages_Sitewide_Notices_Widget' ); } ); 
/bp-members/bp-members-widgets.php  
  1. add_action( 'widgets_init', function() { return register_widget( 'BP_Core_Members_Widget' ); } ); 
  1. add_action( 'widgets_init', function() { return register_widget( 'BP_Core_Whos_Online_Widget' ); } ); 
  1. add_action( 'widgets_init', function() { return register_widget( 'BP_Core_Recently_Active_Widget' ); } ); 
/bp-groups/bp-groups-widgets.php  
  1. add_action( 'widgets_init', function() { register_widget( 'BP_Groups_Widget' ); } ); 
/bp-friends/bp-friends-widgets.php  
  1. add_action( 'widgets_init', function() { register_widget( 'BP_Core_Friends_Widget' ); } ); 
/bp-core/bp-core-widgets.php  
  1. add_action( 'widgets_init', function() { register_widget( 'BP_Core_Login_Widget' ); } ); 
/bp-core/bp-core-actions.php  
  1. add_action( 'widgets_init', 'bp_widgets_init', 10 ); 
/bp-blogs/bp-blogs-widgets.php  
  1. add_action( 'widgets_init', function() { register_widget( 'BP_Blogs_Recent_Posts_Widget' ); } );