bp_get_forum_topic_count

Return the total topic count for a given user.

Description

(int) bp_get_forum_topic_count( (int) $user_id = 0 ); 

Returns (int)

Parameters (1)

0. $user_id — Optional. (int)
The user id.

Usage

  1. if ( !function_exists( 'bp_get_forum_topic_count' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bp-forums-template.php'; 
  3.  
  4. // The user id. 
  5. $user_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_get_forum_topic_count($user_id); 
  9.  

Defined (1)

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

/bp-forums/bp-forums-template.php  
  1. function bp_get_forum_topic_count( $user_id = 0 ) { 
  2.  
  3. /** 
  4. * Filters the total topic count for a given user. 
  5. * @since 1.2.0 
  6. * @param int $value Total topic count for the given user. 
  7. */