total_forums
Output the number of forums.
Description
Parameters (1)
- 0. $get_total_forums (number) =>
get_total_forums()
- The get total forums.
Usage
- To run the hook, copy the example below.
- $get_total_forums = apply_filters( 'total_forums', $get_total_forums );
- if ( !empty( $get_total_forums ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the total_forums callback
- function filter_total_forums( $get_total_forums ) {
- // make filter magic happen here...
- return $get_total_forums;
- };
- // add the filter
- add_filter( 'total_forums', 'filter_total_forums', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'total_forums', 'filter_total_forums', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /bp-forums/bbpress/bb-includes/functions.bb-statistics.php
- echo apply_filters('total_forums', get_total_forums() );