apply_filters( 'tag_link', string $termlink, int $term_id )
- Since
- 2.3.0, 2.5.0, 5.4.1
Filters the tag link.
Compatibility
- WordPress
- since 5.4.1
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$termlinkstring- Tag link URL.
$term_idint- Term ID.
Where this hook fires · 1
wp-includes/taxonomy.php:4745get_term_link()
Source code
* @since 2.5.0 Deprecated in favor of {@see 'term_link'} filter. * @since 5.4.1 Restored (un-deprecated). * * @param string $termlink Tag link URL. * @param int $term_id Term ID. */ $termlink = apply_filters( 'tag_link', $termlink, $term->term_id ); } elseif ( 'category' === $taxonomy ) { /** * Filters the category link. * * @since 1.5.0Changelog
Introduced in 2.3.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
5.4.1
Restored (un-deprecated).from the docblock
2.5.0
Deprecated in favor of 'term_link' filter.from the docblock
2.3.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 7.0.4 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.