Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: get_edit_tag_link

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
654 function get_edit_tag_link( $tag_id = 0, $taxonomy = 'post_tag' ) {
655      global $post_type;
656      $tax = get_taxonomy($taxonomy);
657      if ( !current_user_can($tax->cap->edit_terms) )
658           return;
659
660      $tag = get_term($tag_id, $taxonomy);
661
662      $location = admin_url('edit-tags.php?action=edit&taxonomy=' . $taxonomy . '&' . (!empty($post_type) ? 'post_type=' . $post_type .'&' : '') .'tag_ID=' . $tag->term_id);
663      return apply_filters( 'get_edit_tag_link', $location );
664 }
665
666 /**
667  * Display or retrieve edit tag link with formatting.
668  *
669  * @since 2.7.0
670  *
671  * @param string $link Optional. Anchor text.
672  * @param string $before Optional. Display before edit link.