edit_tag_link() WordPress Function

The edit_tag_link() function displays a link to the editor for a given tag. This function is typically used within the WordPress loop.

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

$link

(string)(Optional) Anchor text. If empty, default is 'Edit This'.

Default value: ''

$before

(string)(Optional) Display before edit link.

Default value: ''

$after

(string)(Optional) Display after edit link.

Default value: ''

$tag

(WP_Term)(Optional) Term object. If null, the queried object will be inspected.

Default value: null


Top ↑

Source

File: wp-includes/link-template.php

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;
}


Top ↑

Changelog

Changelog
VersionDescription
2.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More