bp_get_profile_group_name

Return the XProfile group name.

Description

(string) bp_get_profile_group_name(); 

Returns (string)


Usage

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

Defined (1)

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

/bp-xprofile/bp-xprofile-template.php  
  1. function bp_get_profile_group_name() { 
  2.  
  3. // Check action variable. 
  4. $group_id = bp_action_variable( 1 ); 
  5. if ( empty( $group_id ) || ! is_numeric( $group_id ) ) { 
  6. $group_id = 1; 
  7.  
  8. // Check for cached group. 
  9. $group = new BP_XProfile_Group( $group_id ); 
  10.  
  11. /** 
  12. * Filters the profile group name. 
  13. * @since 1.0.0 
  14. * @since 2.6.0 Added the `$group_id` parameter 
  15. * @param string $name Name of the profile group. 
  16. * @param int $group_id ID of the profile group. 
  17. */ 
  18. return apply_filters( 'bp_get_profile_group_name', $group->name, $group_id );