Changeset 4331
- Timestamp:
- 11/04/2012 04:22:18 AM (13 years ago)
- Location:
- trunk/includes
- Files:
-
- 7 edited
-
extend/buddypress.php (modified) (1 diff)
-
forums/template-tags.php (modified) (5 diffs)
-
replies/functions.php (modified) (2 diffs)
-
replies/template-tags.php (modified) (1 diff)
-
topics/functions.php (modified) (2 diffs)
-
topics/template-tags.php (modified) (5 diffs)
-
users/options.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/extend/buddypress.php
r4279 r4331 393 393 394 394 // Try to get the activity ID of the post 395 $activity_id = absint( get_post_meta( $post_id, '_bbp_activity_id', true ));395 $activity_id = (int) get_post_meta( $post_id, '_bbp_activity_id', true ); 396 396 397 397 // Bail if no activity ID is in post meta -
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 -
trunk/includes/replies/functions.php
r4267 r4331 1363 1363 1364 1364 // Filter and return 1365 return absint( apply_filters( 'bbp_get_replies_per_page', $retval, $default ));1365 return (int) apply_filters( 'bbp_get_replies_per_page', $retval, $default ); 1366 1366 } 1367 1367 … … 1386 1386 1387 1387 // Filter and return 1388 return absint( apply_filters( 'bbp_get_replies_per_rss_page', $retval, $default ));1388 return (int) apply_filters( 'bbp_get_replies_per_rss_page', $retval, $default ); 1389 1389 } 1390 1390 -
trunk/includes/replies/template-tags.php
r4258 r4331 698 698 */ 699 699 function bbp_get_reply_revision_count( $reply_id = 0, $integer = false ) { 700 $count = absint( count( bbp_get_reply_revisions( $reply_id )) );700 $count = (int) count( bbp_get_reply_revisions( $reply_id ) ); 701 701 $filter = ( true === $integer ) ? 'bbp_get_reply_revision_count_int' : 'bbp_get_reply_revision_count'; 702 702 -
trunk/includes/topics/functions.php
r4267 r4331 3070 3070 3071 3071 // Filter and return 3072 return absint( apply_filters( 'bbp_get_topics_per_page', $retval, $default ));3072 return (int) apply_filters( 'bbp_get_topics_per_page', $retval, $default ); 3073 3073 } 3074 3074 … … 3093 3093 3094 3094 // Filter and return 3095 return absint( apply_filters( 'bbp_get_topics_per_rss_page', $retval, $default ));3095 return (int) apply_filters( 'bbp_get_topics_per_rss_page', $retval, $default ); 3096 3096 } 3097 3097 -
trunk/includes/topics/template-tags.php
r4322 r4331 927 927 */ 928 928 function bbp_get_topic_revision_count( $topic_id = 0, $integer = false ) { 929 $count = absint( count( bbp_get_topic_revisions( $topic_id )) );929 $count = (int) count( bbp_get_topic_revisions( $topic_id ) ); 930 930 $filter = ( true === $integer ) ? 'bbp_get_topic_revision_count_int' : 'bbp_get_topic_revision_count'; 931 931 … … 1924 1924 function bbp_get_topic_reply_count( $topic_id = 0, $integer = false ) { 1925 1925 $topic_id = bbp_get_topic_id( $topic_id ); 1926 $replies = absint( get_post_meta( $topic_id, '_bbp_reply_count', true ));1926 $replies = (int) get_post_meta( $topic_id, '_bbp_reply_count', true ); 1927 1927 $filter = ( true === $integer ) ? 'bbp_get_topic_reply_count_int' : 'bbp_get_topic_reply_count'; 1928 1928 … … 1957 1957 function bbp_get_topic_post_count( $topic_id = 0, $integer = false ) { 1958 1958 $topic_id = bbp_get_topic_id( $topic_id ); 1959 $replies = absint( get_post_meta( $topic_id, '_bbp_reply_count', true )) + 1;1959 $replies = (int) get_post_meta( $topic_id, '_bbp_reply_count', true ) + 1; 1960 1960 $filter = ( true === $integer ) ? 'bbp_get_topic_post_count_int' : 'bbp_get_topic_post_count'; 1961 1961 … … 1992 1992 function bbp_get_topic_reply_count_hidden( $topic_id = 0, $integer = false ) { 1993 1993 $topic_id = bbp_get_topic_id( $topic_id ); 1994 $replies = absint( get_post_meta( $topic_id, '_bbp_reply_count_hidden', true ));1994 $replies = (int) get_post_meta( $topic_id, '_bbp_reply_count_hidden', true ); 1995 1995 $filter = ( true === $integer ) ? 'bbp_get_topic_reply_count_hidden_int' : 'bbp_get_topic_reply_count_hidden'; 1996 1996 … … 2023 2023 function bbp_get_topic_voice_count( $topic_id = 0, $integer = false ) { 2024 2024 $topic_id = bbp_get_topic_id( $topic_id ); 2025 $voices = absint( get_post_meta( $topic_id, '_bbp_voice_count', true ));2025 $voices = (int) get_post_meta( $topic_id, '_bbp_voice_count', true ); 2026 2026 $filter = ( true === $integer ) ? 'bbp_get_topic_voice_count_int' : 'bbp_get_topic_voice_count'; 2027 2027 -
trunk/includes/users/options.php
r4258 r4331 152 152 return false; 153 153 154 $count = absint( get_user_option( '_bbp_topic_count', $user_id ));154 $count = (int) get_user_option( '_bbp_topic_count', $user_id ); 155 155 $filter = ( false == $integer ) ? 'bbp_get_user_topic_count_int' : 'bbp_get_user_topic_count'; 156 156 … … 190 190 return false; 191 191 192 $count = absint( get_user_option( '_bbp_reply_count', $user_id ));192 $count = (int) get_user_option( '_bbp_reply_count', $user_id ); 193 193 $filter = ( true == $integer ) ? 'bbp_get_user_topic_count_int' : 'bbp_get_user_topic_count'; 194 194 … … 230 230 $topics = bbp_get_user_topic_count( $user_id, true ); 231 231 $replies = bbp_get_user_reply_count( $user_id, true ); 232 $count = absint( $topics + $replies );232 $count = (int) $topics + $replies; 233 233 $filter = ( true == $integer ) ? 'bbp_get_user_post_count_int' : 'bbp_get_user_post_count'; 234 234
Note: See TracChangeset
for help on using the changeset viewer.