bbp_get_topic_tag_edit_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_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 ); }
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |