bp_get_new_group_id

The BuddyPress bp get new group id function.

Description

(mixed|void) bp_get_new_group_id(); 

Returns (mixed|void)


Usage

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

Defined (1)

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

/bp-groups/bp-groups-template.php  
  1. function bp_get_new_group_id() { 
  2. $bp =buddypress); 
  3. $new_group_id = isset( $bp->groups->new_group_id ) 
  4. ? $bp->groups->new_group_id 
  5. : 0; 
  6.  
  7. /** 
  8. * Filters the new group ID. 
  9. * @since 1.1.0 
  10. * @param int $new_group_id ID of the new group. 
  11. */ 
  12. return (int) apply_filters( 'bp_get_new_group_id', $new_group_id );