bp_get_current_group_name

Returns the name of the current group.

Description

(string) bp_get_current_group_name(); 

Returns (string)

The name of the current group, if there is one.


Usage

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

Defined (1)

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

/bp-groups/bp-groups-template.php  
  1. function bp_get_current_group_name() { 
  2. $current_group = groups_get_current_group(); 
  3. $current_name = bp_get_group_name( $current_group ); 
  4.  
  5. /** 
  6. * Filters the name of the current group. 
  7. * @since 1.2.0 
  8. * @param string $current_name Name of the current group. 
  9. * @param object $current_group Instance holding the current group. 
  10. */ 
  11. return apply_filters( 'bp_get_current_group_name', $current_name, $current_group );