bbp_bump_topic_reply_count_hidden( int $topic_id, int $difference = 1 )

Bump the total hidden reply count of a topic

Description

Parameters

$topic_id

(int) (Optional) Forum id.

$difference

(int) (Optional) Default 1

Default value: 1

Return

(int) Forum hidden reply count

Source

File: bp-forums/topics/functions.php

function bbp_bump_topic_reply_count_hidden( $topic_id = 0, $difference = 1 ) {

	// Get counts
	$topic_id    = bbp_get_topic_id( $topic_id );
	$reply_count = bbp_get_topic_reply_count_hidden( $topic_id, true );
	$new_count   = (int) $reply_count + (int) $difference;

	// Update this topic id's hidder reply count
	update_post_meta( $topic_id, '_bbp_reply_count_hidden', (int) $new_count );

	return (int) apply_filters( 'bbp_bump_topic_reply_count_hidden', (int) $new_count, $topic_id, (int) $difference );
}

Changelog

Changelog
Version Description
bbPress (r3825) 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.