bbp_get_topic_tag_link( $tag = '' )
Return the link of the current tag
Description Description
Return Return
(string) Term Name
Source Source
File: includes/topics/template.php
function bbp_get_topic_tag_link( $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();
}
// Get the term link
$retval = ! empty( $term->term_id )
? get_term_link( $term, bbp_get_topic_tag_tax_id() )
: '';
// Filter & return
return apply_filters( 'bbp_get_topic_tag_link', $retval, $tag, $term );
}
Changelog Changelog
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |