bp_friends_register_widgets

Register the friends widget.

Description

bp_friends_register_widgets(); 

Usage

  1. if ( !function_exists( 'bp_friends_register_widgets' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-friends/bp-friends-widgets.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_friends_register_widgets(); 
  7.  

Defined (1)

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

/bp-friends/bp-friends-widgets.php  
  1. function bp_friends_register_widgets() { 
  2. if ( ! bp_is_active( 'friends' ) ) { 
  3. return; 
  4.  
  5. // The Friends widget works only when looking an a displayed user,  
  6. // and the concept of "displayed user" doesn't exist on non-root blogs,  
  7. // so we don't register the widget there. 
  8. if ( ! bp_is_root_blog() ) { 
  9. return; 
  10.  
  11. add_action( 'widgets_init', create_function( '', 'return register_widget("BP_Core_Friends_Widget");' ) );