WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/edit tag link

Description

Displays a link to edit the current tag, if the user is logged in and allowed to edit the tag. It must be within The Loop.

Use get_edit_tag_link to retrieve the url to edit.

Usage

 <?php edit_tag_link$link$before$after$tag ); ?> 

Parameters

$link
(string) (optional) The link text.
Default: __('Edit This')
$before
(string) (optional) Text to put before the link text.
Default: None
$after
(string) (optional) Text to put after the link text.
Default: None
$tag
(integer/object) (optional) Tag object or ID.
Default: Current tag ID.

Examples

Default Usage

Displays edit tag link using defaults.

<?php edit_tag_link(); ?>

Displays Edit Tag in Paragraph Tag

Displays edit tag link, with link text "edit tag", in a paragraph (<p>) tag.

<?php edit_tag_link('edit tag', '<p>', '</p>'); ?>

Changelog

Since: 2.7.0

Source File

edit_tag_link() is located in wp-includes/link-template.php.

Related

Edit Link: edit_post_link(), edit_comment_link(), edit_tag_link(), edit_bookmark_link()

See also index of Function Reference and index of Template Tags.