bbp_insert_topic_update_counts( int $topic_id, int $forum_id )

Update counts after a topic is inserted via bbp_insert_topic.


Description Description


Parameters Parameters

$topic_id

(Required) The topic id.

$forum_id

(Required) The forum id.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/topics/functions.php

function bbp_insert_topic_update_counts( $topic_id = 0, $forum_id = 0 ) {

	// If the topic is public, update the forum topic counts.
	if ( bbp_is_topic_public( $topic_id ) ) {
		bbp_increase_forum_topic_count( $forum_id );

	// If the topic isn't public only update the forum topic hidden count.
	} else {
		bbp_increase_forum_topic_count_hidden( $forum_id );
	}
}

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.