bbp_get_topic_tag_name( $tag = '' )
Return the name of the current tag
Description
Return
(string) Term Name
Source
File: bp-forums/topics/template.php
3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 | function bbp_get_topic_tag_name( $tag = '' ) { // Get the term if ( ! empty ( $tag ) ) { $term = get_term_by( 'slug' , $tag , bbp_get_topic_tag_tax_id() ); } else { $tag = get_query_var( 'term' ); $term = get_queried_object(); } // Add before and after if description exists if ( ! empty ( $term ->name ) ) { $retval = $term ->name; // No name } else { $retval = '' ; } return apply_filters( 'bbp_get_topic_tag_name' , $retval ); } |
Changelog
Version | Description |
---|---|
bbPress (r3109) | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.