Changeset 4331 for trunk/includes/forums/template-tags.php
- Timestamp:
- 11/04/2012 04:22:18 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/includes/forums/template-tags.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/forums/template-tags.php
r4258 r4331 1177 1177 function bbp_get_forum_subforum_count( $forum_id = 0, $integer = false ) { 1178 1178 $forum_id = bbp_get_forum_id( $forum_id ); 1179 $forum_count = absint( get_post_meta( $forum_id, '_bbp_forum_subforum_count', true ));1179 $forum_count = (int) get_post_meta( $forum_id, '_bbp_forum_subforum_count', true ); 1180 1180 $filter = ( true === $integer ) ? 'bbp_get_forum_subforum_count_int' : 'bbp_get_forum_subforum_count'; 1181 1181 … … 1214 1214 $forum_id = bbp_get_forum_id( $forum_id ); 1215 1215 $meta_key = empty( $total_count ) ? '_bbp_topic_count' : '_bbp_total_topic_count'; 1216 $topics = absint( get_post_meta( $forum_id, $meta_key, true ));1216 $topics = (int) get_post_meta( $forum_id, $meta_key, true ); 1217 1217 $filter = ( true === $integer ) ? 'bbp_get_forum_topic_count_int' : 'bbp_get_forum_topic_count'; 1218 1218 … … 1251 1251 $forum_id = bbp_get_forum_id( $forum_id ); 1252 1252 $meta_key = empty( $total_count ) ? '_bbp_reply_count' : '_bbp_total_reply_count'; 1253 $replies = absint( get_post_meta( $forum_id, $meta_key, true ));1253 $replies = (int) get_post_meta( $forum_id, $meta_key, true ); 1254 1254 $filter = ( true === $integer ) ? 'bbp_get_forum_reply_count_int' : 'bbp_get_forum_reply_count'; 1255 1255 … … 1289 1289 $topics = bbp_get_forum_topic_count( $forum_id, $total_count, true ); 1290 1290 $meta_key = empty( $total_count ) ? '_bbp_reply_count' : '_bbp_total_reply_count'; 1291 $replies = absint( get_post_meta( $forum_id, $meta_key, true ));1291 $replies = (int) get_post_meta( $forum_id, $meta_key, true ); 1292 1292 $retval = $replies + $topics; 1293 1293 $filter = ( true === $integer ) ? 'bbp_get_forum_post_count_int' : 'bbp_get_forum_post_count'; … … 1325 1325 function bbp_get_forum_topic_count_hidden( $forum_id = 0, $integer = false ) { 1326 1326 $forum_id = bbp_get_forum_id( $forum_id ); 1327 $topics = absint( get_post_meta( $forum_id, '_bbp_topic_count_hidden', true ));1327 $topics = (int) get_post_meta( $forum_id, '_bbp_topic_count_hidden', true ); 1328 1328 $filter = ( true === $integer ) ? 'bbp_get_forum_topic_count_hidden_int' : 'bbp_get_forum_topic_count_hidden'; 1329 1329
Note: See TracChangeset
for help on using the changeset viewer.