bp_get_current_profile_group_id

Return the current profile group ID.

Description

(int) bp_get_current_profile_group_id(); 

Returns (int)


Usage

  1. if ( !function_exists( 'bp_get_current_profile_group_id' ) ) { 
  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_current_profile_group_id(); 
  7.  

Defined (1)

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

/bp-xprofile/bp-xprofile-template.php  
  1. function bp_get_current_profile_group_id() { 
  2. $profile_group_id = bp_action_variable( 1 ); 
  3. if ( empty( $profile_group_id ) ) { 
  4. $profile_group_id = 1; 
  5.  
  6. /** 
  7. * Filters the current profile group ID. 
  8. * Possible values are admin/profile/edit/[group-id]. 
  9. * @since 1.1.0 
  10. * @param int $profile_group_id Current profile group ID. 
  11. */ 
  12. return (int) apply_filters( 'bp_get_current_profile_group_id', $profile_group_id );