term_links-{$taxonomy} WordPress Filter Hook
The term_links-{$taxonomy} hook is used to filter the links for a given taxonomy. This can be useful for adding custom classes or attributes to the links.
apply_filters( "term_links-{$taxonomy}", string[] $links ) #
Filters the term links for a given taxonomy.
Description
The dynamic portion of the hook name, $taxonomy
, refers to the taxonomy slug.
Possible hook names include:
term_links-category
term_links-post_tag
term_links-post_format
Parameters
- $links
(string[])An array of term links.
Source
Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |