Changeset 4147 for trunk/bp-forums/bp-forums-template.php
- Timestamp:
- 03/23/2011 08:36:24 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-forums/bp-forums-template.php
r4124 r4147 1174 1174 } 1175 1175 1176 /** 1177 * Echo the current topic's tag list, comma-separated 1178 * 1179 * @package BuddyPress 1180 * @since 1.3 1181 */ 1182 function bp_forum_topic_tag_list() { 1183 echo bp_get_forum_topic_tag_list(); 1184 } 1185 /** 1186 * Get the current topic's tag list 1187 * 1188 * @package BuddyPress 1189 * @since 1.3 1190 * 1191 * @param str $format 'string' returns comma-separated string; otherwise returns array 1192 * @return mixed $tags 1193 */ 1194 function bp_get_forum_topic_tag_list( $format = 'string' ) { 1195 do_action( 'bbpress_init' ); 1196 1197 // Pull up the tag objects 1198 $tags_data = bb_get_topic_tags( bp_get_the_topic_id() ); 1199 1200 // Convert them to a comma-separated string 1201 $tags = array(); 1202 foreach( $tags_data as $tag_data ) { 1203 $tags[] = $tag_data->name; 1204 } 1205 1206 if ( 'string' == $format ) 1207 $tags = implode( ', ', $tags ); 1208 1209 return apply_filters( 'bp_forum_topic_tag_list', $tags, $format ); 1210 } 1211 1176 1212 function bp_forum_action() { 1177 1213 echo bp_get_forum_action();
Note: See TracChangeset
for help on using the changeset viewer.