bp_avatar_suggestions_group

Registers the BP Avatar Suggestions group's component.

Description

bp_avatar_suggestions_group(); 

Usage

  1. if ( !function_exists( 'bp_avatar_suggestions_group' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bp-avatar-suggestions/includes/bp-avatar-suggestions-groups.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_avatar_suggestions_group(); 
  7.  

Defined (1)

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

/includes/bp-avatar-suggestions-groups.php  
  1. function bp_avatar_suggestions_group() { 
  2. // Get BuddyPress instance 
  3. $bp = buddypress(); 
  4.  
  5. // Only to use when avatars are not completely 
  6. // disabled and BuddyPress group uploads are not disabled 
  7. if ( empty( $bp->avatar->show_avatars ) || ! bp_disable_group_avatar_uploads() ) { 
  8. return; 
  9. } elseif ( ! is_admin() && ( empty( $_REQUEST['page'] ) || 'bp-settings' != $_REQUEST['page'] ) ) { 
  10. add_filter( 'bp_disable_group_avatar_uploads', array( 'Avatar_Suggestions_Group', 'display_avatars' ), 10, 1 ); 
  11.  
  12. bp_register_group_extension( 'Avatar_Suggestions_Group' );