Changeset 6296 for trunk/src/includes/forums/template.php
- Timestamp:
- 02/21/2017 06:19:56 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/includes/forums/template.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/forums/template.php
r6291 r6296 1429 1429 * @param boolean $integer Optional. Whether or not to format the result 1430 1430 * @uses bbp_get_forum_id() To get the forum id 1431 * @uses get_post_meta() To get the forum post count 1431 * @uses bbp_get_forum_topic_count() To get the topic count 1432 * @uses bbp_get_forum_reply_count() To get the reply count 1432 1433 * @uses apply_filters() Calls 'bbp_get_forum_post_count' with the 1433 1434 * post count and forum id … … 1437 1438 $forum_id = bbp_get_forum_id( $forum_id ); 1438 1439 $topics = bbp_get_forum_topic_count( $forum_id, $total_count, true ); 1439 $meta_key = empty( $total_count ) ? '_bbp_reply_count' : '_bbp_total_reply_count'; 1440 $replies = (int) get_post_meta( $forum_id, $meta_key, true ); 1440 $replies = bbp_get_forum_reply_count( $forum_id, $total_count, true ); 1441 1441 $retval = $replies + $topics; 1442 $filter = ( true === $integer ) ? 'bbp_get_forum_post_count_int' : 'bbp_get_forum_post_count'; 1442 $filter = ( true === $integer ) 1443 ? 'bbp_get_forum_post_count_int' 1444 : 'bbp_get_forum_post_count'; 1443 1445 1444 1446 return apply_filters( $filter, $retval, $forum_id );
Note: See TracChangeset
for help on using the changeset viewer.