bbp_get_topic_tag_link( $tag = '' )

Return the link of the current tag


Description Description


Return Return

(string) Term Name


Top ↑

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 );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.