bbp_decrease_topic_reply_count_hidden( int $topic_id )

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


Description Description


Parameters Parameters

$topic_id

(Required) The topic id.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/topics/functions.php

function bbp_decrease_topic_reply_count_hidden( $topic_id = 0 ) {

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

	// If it's a reply, get the topic id.
	if ( bbp_is_reply( $topic_id ) ) {
		$reply_id = $topic_id;
		$topic_id = bbp_get_reply_topic_id( $reply_id );

		// Update inverse based on item status
		if ( bbp_is_reply_public( $reply_id ) ) {
			bbp_decrease_topic_reply_count( $topic_id );
			return;
		}
	}

	// Bump down
	bbp_bump_topic_reply_count_hidden( $topic_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.