bp_blogs_register_widgets

Register the widgets for the Blogs component.

Description

bp_blogs_register_widgets(); 

Usage

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

Defined (1)

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

/bp-blogs/bp-blogs-widgets.php  
  1. function bp_blogs_register_widgets() { 
  2. global $wpdb; 
  3.  
  4. if ( bp_is_active( 'activity' ) && bp_is_root_blog( $wpdb->blogid ) ) { 
  5. add_action( 'widgets_init', function() { register_widget( 'BP_Blogs_Recent_Posts_Widget' ); } );