Changeset 5835 for trunk/src/includes/topics/template.php
- Timestamp:
- 07/15/2015 04:30:34 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/topics/template.php
r5827 r5835 2358 2358 * Output a the tags of a topic 2359 2359 * 2360 * @since bbPress (r2688) 2361 * 2360 2362 * @param int $topic_id Optional. Topic id 2361 2363 * @param array $args See {@link bbp_get_topic_tag_list()} … … 2367 2369 /** 2368 2370 * Return the tags of a topic 2371 * 2372 * @since bbPress (r2688) 2369 2373 * 2370 2374 * @param int $topic_id Optional. Topic id … … 2381 2385 // Bail if topic-tags are off 2382 2386 if ( ! bbp_allow_topic_tags() ) { 2383 return ;2387 return ''; 2384 2388 } 2385 2389 … … 2388 2392 'before' => '<div class="bbp-topic-tags"><p>' . esc_html__( 'Tagged:', 'bbpress' ) . ' ', 2389 2393 'sep' => ', ', 2390 'after' => '</p></div>' 2394 'after' => '</p></div>', 2395 'none' => '' 2391 2396 ), 'get_topic_tag_list' ); 2392 2397 … … 2399 2404 $terms = get_post_meta( $topic_id, '_bbp_spam_topic_tags', true ); 2400 2405 2401 // If terms exist, explode them and compile the return value2406 // If terms exist, implode them and compile the return value 2402 2407 if ( ! empty( $terms ) ) { 2403 2408 $terms = implode( $r['sep'], $terms ); 2404 2409 $retval = $r['before'] . $terms . $r['after']; 2405 2406 // No terms so return emty string2407 } else {2408 $retval = '';2409 2410 } 2410 2411 2411 2412 // Topic is not spam so display a clickable term list 2412 2413 } else { 2413 $retval = get_the_term_list( $topic_id, bbp_get_topic_tag_tax_id(), $r['before'], $r['sep'], $r['after'] ); 2414 $terms = get_the_term_list( $topic_id, bbp_get_topic_tag_tax_id(), $r['before'], $r['sep'], $r['after'] ); 2415 } 2416 2417 // No terms so return none string 2418 if ( empty( $terms ) ) { 2419 $retval = $r['none']; 2414 2420 } 2415 2421
Note: See TracChangeset
for help on using the changeset viewer.