bbp_get_forum_subforum_count( int $forum_id, boolean $integer = false )

Return total subforum count of a forum

Description

Parameters

$forum_id

(int) (Optional) Forum id

$integer

(boolean) (Optional) Whether or not to format the result

Default value: false

Return

(int) Forum's subforum count

Source

File: bp-forums/forums/template.php

	function bbp_get_forum_subforum_count( $forum_id = 0, $integer = false ) {
		$forum_id    = bbp_get_forum_id( $forum_id );
		$forum_count = (int) get_post_meta( $forum_id, '_bbp_forum_subforum_count', true );
		$filter      = ( true === $integer ) ? 'bbp_get_forum_subforum_count_int' : 'bbp_get_forum_subforum_count';

		return apply_filters( $filter, $forum_count, $forum_id );
	}

Changelog

Changelog
Version Description
bbPress (r2464) Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.