groups_total_public_forum_topic_count

Filters the total count of all public topics of a given type, across groups/forums.

Description

apply_filters( 'groups_total_public_forum_topic_count', (number) $bp_groups_group ); 

Parameters (1)

0. $bp_groups_group (number) => BP_Groups_Group::get_global_forum_topic_count( $type )
Total count of all public topics.

Usage

To run the hook, copy the example below.
  1. $bp_groups_group = apply_filters( 'groups_total_public_forum_topic_count', $bp_groups_group ); 
  2.  
  3. if ( !empty( $bp_groups_group ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the groups_total_public_forum_topic_count callback 
  2. function filter_groups_total_public_forum_topic_count( $bp_groups_group ) { 
  3. // make filter magic happen here... 
  4. return $bp_groups_group
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'groups_total_public_forum_topic_count', 'filter_groups_total_public_forum_topic_count', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'groups_total_public_forum_topic_count', 'filter_groups_total_public_forum_topic_count', 10, 1 ); 

Defined (1)

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

/bp-groups/bp-groups-forums.php  
  1. return apply_filters( 'groups_total_public_forum_topic_count', BP_Groups_Group::get_global_forum_topic_count( $type ) );