edit_term_link
Filter HookDescription
Filters the anchor tag for the edit link of a term.Hook Information
File Location |
wp-includes/link-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1166 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$link
|
The anchor tag for the edit link. |
int
|
$term_id
|
Term ID. |
Usage Examples
Basic Usage
<?php
// Hook into edit_term_link
add_filter('edit_term_link', 'my_custom_filter', 10, 2);
function my_custom_filter($link, $term_id) {
// Your custom filtering logic here
return $link;
}
Source Code Context
wp-includes/link-template.php:1166
- How this hook is used in WordPress core
<?php
1161 * @since 3.1.0
1162 *
1163 * @param string $link The anchor tag for the edit link.
1164 * @param int $term_id Term ID.
1165 */
1166 $link = $before . apply_filters( 'edit_term_link', $link, $term->term_id ) . $after;
1167
1168 if ( $display ) {
1169 echo $link;
1170 } else {
1171 return $link;
PHP Documentation
<?php
/**
* Filters the anchor tag for the edit link of a term.
*
* @since 3.1.0
*
* @param string $link The anchor tag for the edit link.
* @param int $term_id Term ID.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/link-template.php
Related Hooks
Related hooks will be displayed here in future updates.