bbp_decrease_forum_topic_count_hidden( int $forum_id )

Decrease the total hidden topic count of a forum by one.


Description Description


Parameters Parameters

$forum_id

(Required) The forum id.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/forums/functions.php

function bbp_decrease_forum_topic_count_hidden( $forum_id = 0 ) {

	// Bail early if no id is passed.
	if ( empty( $forum_id ) ) {
		return;
	}

	// If it's a topic, get the forum id.
	if ( bbp_is_topic( $forum_id ) ) {
		$topic_id = $forum_id;
		$forum_id = bbp_get_topic_forum_id( $topic_id );

		// Update inverse based on item status
		if ( bbp_is_topic_public( $topic_id ) ) {
			bbp_decrease_forum_topic_count( $forum_id );
			return;
		}
	}

	// Bump down
	bbp_bump_forum_topic_count_hidden( $forum_id, -1 );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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