bbp_get_forum_topic_count_hidden( int $forum_id, bool $total_count = true, boolean $integer = null )

Return total hidden topic count of a forum (hidden includes trashed, spammed and pending topics)


Description Description


Parameters Parameters

$forum_id

(Optional) Forum id

$total_count

(Optional) To get the total count or normal count?

Default value: true

$integer

(Optional) Whether or not to format the result

Default value: null


Top ↑

Return Return

(int) Topic hidden topic count


Top ↑

Source Source

File: includes/forums/template.php

	function bbp_get_forum_topic_count_hidden( $forum_id = 0, $total_count = true, $integer = null ) {
		$forum_id = bbp_get_forum_id( $forum_id );
		$meta_key = empty( $total_count ) ? '_bbp_topic_count_hidden' : '_bbp_topic_reply_count_hidden';
		$topics   = (int) get_post_meta( $forum_id, $meta_key, true );
		$filter   = ( true === $integer )
			? 'bbp_get_forum_topic_count_hidden_int'
			: 'bbp_get_forum_topic_count_hidden';

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

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 bbPress (r6922) Changed function signature to add total counts
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.