get_edit_tag_link

Retrieves the edit link for a tag.

Description

(string) get_edit_tag_link( (int) $tag_id, (string) $taxonomy = 'post_tag' ); 

Returns (string)

The edit tag link URL for the given tag.

Parameters (2)

0. $tag_id (int)
The tag id.
1. $taxonomy — Optional. (string) => 'post_tag'
Taxonomy slug. Default post_tag..

Usage

  1. if ( !function_exists( 'get_edit_tag_link' ) ) { 
  2. require_once ABSPATH . WPINC . '/link-template.php'; 
  3.  
  4. // The tag id. 
  5. $tag_id = -1; 
  6.  
  7. // Optional. Taxonomy slug. Default 'post_tag'. 
  8. $taxonomy = 'post_tag'; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = get_edit_tag_link($tag_id, $taxonomy); 
  12.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/link-template.php  
  1. function get_edit_tag_link( $tag_id, $taxonomy = 'post_tag' ) { 
  2. /** 
  3. * Filters the edit link for a tag (or term in another taxonomy). 
  4. * @since 2.7.0 
  5. * @param string $link The term edit link. 
  6. */ 
  7. return apply_filters( 'get_edit_tag_link', get_edit_term_link( $tag_id, $taxonomy ) );