bbp_get_topic_tag_edit_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_edit_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's edit link
		if ( ! empty( $term->term_id ) ) {

			// Pretty or ugly URL
			$retval = bbp_use_pretty_urls()
				? user_trailingslashit( trailingslashit( bbp_get_topic_tag_link() ) . bbp_get_edit_slug() )
				: add_query_arg( array( bbp_get_edit_rewrite_id() => '1' ), bbp_get_topic_tag_link() );

		// No link
		} else {
			$retval = '';
		}

		// Filter & return
		return apply_filters( 'bbp_get_topic_tag_edit_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.