Displays or retrieves the edit link for a tag with formatting.
Parameters
$link
stringoptional- Anchor text. If empty, default is ‘Edit This’.
Default:
''
$before
stringoptional- Display before edit link.
Default:
''
$after
stringoptional- Display after edit link.
Default:
''
$tag
WP_Termoptional- Term object. If null, the queried object will be inspected.
Default:
null
Source
function edit_tag_link( $link = '', $before = '', $after = '', $tag = null ) {
$link = edit_term_link( $link, '', '', $tag, false );
/**
* Filters the anchor tag for the edit link for a tag (or term in another taxonomy).
*
* @since 2.7.0
*
* @param string $link The anchor tag for the edit link.
*/
echo $before . apply_filters( 'edit_tag_link', $link ) . $after;
}
Hooks
- apply_filters( ‘edit_tag_link’,
string $link ) Filters the anchor tag for the edit link for a tag (or term in another taxonomy).
Changelog
Version | Description |
---|---|
2.7.0 | Introduced. |
Default Usage
Displays edit tag link using defaults.
Displays Edit Tag in Paragraph Tag
Displays edit tag link, with link text “edit tag”, in a paragraph (<p>) tag.