On this page
edit_tag_link( string $link = '', string $before = '', string $after = '', WP_Term $tag = null )
Displays or retrieves the edit link for a tag with formatting.
Parameters
$linkstring Optional-
Anchor text. If empty, default is 'Edit This'.
Default:
'' $beforestring Optional-
Display before edit link.
Default:
'' $afterstring Optional-
Display after edit link.
Default:
'' $tagWP_Term Optional-
Term object. If null, the queried object will be inspected.
Default:
null
Source
File: wp-includes/link-template.php. View all references
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).
Related
Uses
| Uses | Description |
|---|---|
| edit_term_link() wp-includes/link-template.php | Displays or retrieves the edit term link with formatting. |
| apply_filters() wp-includes/plugin.php | Calls the callback functions that have been added to a filter hook. |
Changelog
| Version | Description |
|---|---|
| 2.7.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/edit_tag_link