bbp_bump_forum_topic_count_hidden( int $forum_id, int $difference = 1 )
Bump the total hidden topic count of a forum
Description
Parameters
- $forum_id
-
(Optional) Forum id.
- $difference
-
(Optional) Default 1
Default value: 1
Return
(int) Forum hidden topic count
Source
File: bp-forums/forums/functions.php
function bbp_bump_forum_topic_count_hidden( $forum_id = 0, $difference = 1 ) { // Get some counts $forum_id = bbp_get_forum_id( $forum_id ); $topic_count = bbp_get_forum_topic_count_hidden( $forum_id, true ); $new_count = (int) $topic_count + (int) $difference; // Update this forum id update_post_meta( $forum_id, '_bbp_topic_count_hidden', (int) $new_count ); return (int) apply_filters( 'bbp_bump_forum_topic_count_hidden', (int) $new_count, $forum_id, (int) $difference ); }
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.