edit_tag_link

Displays or retrieves the edit link for a tag with formatting.

Description

edit_tag_link( (string) $link = '', (string) $before = '', (string) $after = '', (null) $tag = null ); 

Parameters (4)

0. $link — Optional. (string) => ''
Anchor text. Default empty.
1. $before — Optional. (string) => ''
Display before edit link. Default empty.
2. $after — Optional. (string) => ''
Display after edit link. Default empty.
3. $tag — Optional. (null) => null
Term object. If null, the queried object will be inspected. Default null.

Usage

  1. if ( !function_exists( 'edit_tag_link' ) ) { 
  2. require_once ABSPATH . WPINC . '/link-template.php'; 
  3.  
  4. // Optional. Anchor text. Default empty. 
  5. $link = ''; 
  6.  
  7. // Optional. Display before edit link. Default empty. 
  8. $before = ''; 
  9.  
  10. // Optional. Display after edit link. Default empty. 
  11. $after = ''; 
  12.  
  13. // Optional. Term object. If null, the queried object will be inspected. 
  14. // Default null. 
  15. $tag = null; 
  16.  
  17. // NOTICE! Understand what this does before running. 
  18. $result = edit_tag_link($link, $before, $after, $tag); 
  19.  

Defined (1)

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

/wp-includes/link-template.php  
  1. function edit_tag_link( $link = '', $before = '', $after = '', $tag = null ) { 
  2. $link = edit_term_link( $link, '', '', $tag, false ); 
  3.  
  4. /** 
  5. * Filters the anchor tag for the edit link for a tag (or term in another taxonomy). 
  6. * @since 2.7.0 
  7. * @param string $link The anchor tag for the edit link. 
  8. */ 
  9. echo $before . apply_filters( 'edit_tag_link', $link ) . $after;