bp_forums_total_topic_count

  • apply_filters( 'bp_forums_total_topic_count', $count )

    Source Reference:

    • Component: BuddyPress :: bp-forums
      File: /bp-forums/bp-forums-functions.php :: Trac Source Line: 290
      			$groups_table_sql = '';
      			$groups_where_sql = "t.topic_status = 0";
      		}
      		$count = $bbdb->get_results( $bbdb->prepare( "SELECT t.topic_id FROM {$bbdb->topics} AS t {$groups_table_sql} WHERE {$groups_where_sql}" ) );
      		$count = count( (array)$count );
      	} else {
      		$count = 0;
      	}
      
      	return apply_filters( 'bp_forums_total_topic_count', $count );
      }
      
      /**
       * Get a total "Topics Started" count for a given user
       *
       * @package BuddyPress
       *
       * @param int $user_id ID of the user being queried. Falls back on displayed user, then loggedin
       * @param str $type The current filter/sort type. 'active', 'popular', 'unreplied'
       * @return int $count The topic count
      

Comments are closed.