Changeset 4149 for trunk/bp-forums/bp-forums-template.php
- Timestamp:
- 03/23/2011 09:14:24 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-forums/bp-forums-template.php
r4147 r4149 822 822 } 823 823 } 824 825 // Load topic tags 826 $this->topic_tags = bb_get_topic_tags( $this->topic_id ); 824 827 825 828 if ( (int)$this->total_post_count && (int)$this->pag_num ) { … … 914 917 return false; 915 918 } 916 919 917 920 return apply_filters( 'bp_has_topic_posts', $topic_template->has_posts(), $topic_template ); 918 921 } … … 1193 1196 */ 1194 1197 function bp_get_forum_topic_tag_list( $format = 'string' ) { 1195 do_action( 'bbpress_init' );1198 global $topic_template; 1196 1199 1197 // Pull up the tag objects 1198 $tags_data = bb_get_topic_tags( bp_get_the_topic_id() ); 1200 $tags_data = !empty( $topic_template->topic_tags ) ? $topic_template->topic_tags : false; 1199 1201 1200 // Convert them to a comma-separated string1201 1202 $tags = array(); 1202 foreach( $tags_data as $tag_data ) { 1203 $tags[] = $tag_data->name; 1203 1204 if ( $tags_data ) { 1205 foreach( $tags_data as $tag_data ) { 1206 $tags[] = $tag_data->name; 1207 } 1204 1208 } 1205 1209 … … 1210 1214 } 1211 1215 1216 /** 1217 * Returns true if the current topic has tags 1218 * 1219 * @package BuddyPress 1220 * @since 1.3 1221 * 1222 * @return bool 1223 */ 1224 function bp_forum_topic_has_tags() { 1225 global $topic_template; 1226 1227 $has_tags = false; 1228 1229 if ( !empty( $topic_template->topic_tags ) ) 1230 $has_tags = true; 1231 1232 return apply_filters( 'bp_forum_topic_has_tags', $has_tags ); 1233 } 1234 1212 1235 function bp_forum_action() { 1213 1236 echo bp_get_forum_action();
Note: See TracChangeset
for help on using the changeset viewer.