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

Top ↑

Parameters

$links

(string[])An array of term links.


Top ↑

Source

File: wp-includes/category-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.5.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.