term_link WordPress Filter Hook

The term_link hook is a hook that allows you to modify the link for a given term. This can be useful if you want to change the way the link is displayed or if you want to add additional information to the link.

apply_filters( 'term_link', string $termlink, WP_Term $term, string $taxonomy ) #

Filters the term link.


Parameters

$termlink

(string)Term link URL.

$term

(WP_Term)Term object.

$taxonomy

(string)Taxonomy slug.


Top ↑

More Information

This filter is applied to the link URL for a term prior to printing by the function get_term_link().


Top ↑

Source

File: wp-includes/taxonomy.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.

Show More
Show More