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
-
(Optional) Forum id.
- $difference
-
(Optional) Default 1
Default value: 1
Return
(int) Forum hidden reply count
Source
File: bp-forums/topics/functions.php
2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 | 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
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.