Changeset 2981
- Timestamp:
- 04/03/2011 07:09:48 AM (15 years ago)
- Location:
- branches/plugin/bbp-includes
- Files:
-
- 3 edited
-
bbp-forum-template.php (modified) (1 diff)
-
bbp-topic-functions.php (modified) (4 diffs)
-
bbp-update.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-forum-template.php
r2972 r2981 1142 1142 function bbp_get_forum_hidden_topic_count( $forum_id = 0 ) { 1143 1143 $forum_id = bbp_get_forum_id( $forum_id ); 1144 $topics = get_post_meta( $forum_id, '_bbp_topic_count_hidden', true );1144 $topics = get_post_meta( $forum_id, '_bbp_topic_count_hidden', true ); 1145 1145 1146 1146 return apply_filters( 'bbp_get_forum_hidden_topic_count', (int) $topics, $forum_id ); 1147 }1148 1149 /**1150 * Output total voice count of a forum1151 *1152 * @since bbPress (r2567)1153 *1154 * @param int $forum_id Optional. Forum id1155 * @uses bbp_get_forum_voice_count() To get the forum voice count1156 */1157 function bbp_forum_voice_count( $forum_id = 0 ) {1158 echo bbp_get_forum_voice_count( $forum_id );1159 }1160 /**1161 * Return total voice count of a forum1162 *1163 * @since bbPress (r2567)1164 *1165 * @param int $forum_id Optional. Forum id1166 * @uses bbp_get_forum_id() To get the forum id1167 * @uses get_post_meta() To get the forum voice count1168 * @uses apply_filters() Calls 'bbp_get_forum_voice_count' with the1169 * voice count and forum id1170 * @return int Forum voice count1171 */1172 function bbp_get_forum_voice_count( $forum_id = 0 ) {1173 $forum_id = bbp_get_forum_id( $forum_id );1174 $voices = get_post_meta( $forum_id, '_bbp_forum_voice_count', true );1175 1176 return apply_filters( 'bbp_get_forum_voice_count', (int) $voices, $forum_id );1177 1147 } 1178 1148 -
branches/plugin/bbp-includes/bbp-topic-functions.php
r2976 r2981 747 747 * @uses bbp_update_forum_topic_count() To update the forum topic counts 748 748 * @uses bbp_update_forum_reply_count() To update the forum reply counts 749 * @uses bbp_update_forum_voice_count() To update the forum voice counts750 749 * @uses bbp_update_topic_reply_count() To update the topic reply counts 751 750 * @uses bbp_update_topic_voice_count() To update the topic voice counts … … 763 762 // Forum Reply Counts 764 763 bbp_update_forum_reply_count( $source_topic_forum_id ); 765 // bbp_update_forum_reply_count( $destination_topic_id );766 767 // Forum Voice Counts768 bbp_update_forum_voice_count( $source_topic_forum_id );769 bbp_update_forum_voice_count( $destination_topic_id );770 764 771 765 // Topic Reply Counts … … 963 957 * @uses bbp_update_forum_topic_count() To update the forum topic counts 964 958 * @uses bbp_update_forum_reply_count() To update the forum reply counts 965 * @uses bbp_update_forum_voice_count() To update the forum voice counts966 959 * @uses bbp_update_topic_reply_count() To update the topic reply counts 967 960 * @uses bbp_update_topic_voice_count() To update the topic voice counts … … 980 973 // bbp_update_forum_reply_count( $source_topic_id ); 981 974 bbp_update_forum_reply_count( $destination_topic_id ); 982 983 // Forum Voice Counts984 bbp_update_forum_voice_count( $source_topic_id );985 bbp_update_forum_voice_count( $destination_topic_id );986 975 987 976 // Topic Reply Counts -
branches/plugin/bbp-includes/bbp-update.php
r2970 r2981 57 57 58 58 // _bbp_total_voice_count 59 $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->postmeta} SET meta_key = '_bbp_voice_count' WHERE meta_key = '_bbp_forum_voice_count'" ) );60 59 $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->postmeta} SET meta_key = '_bbp_voice_count' WHERE meta_key = '_bbp_topic_voice_count'" ) ); 61 60
Note: See TracChangeset
for help on using the changeset viewer.