pre_term_link WordPress Filter Hook

The pre_term_link hook is called before a term link is generated. It allows you to modify the term link before it is generated. This can be useful if you need to change the link to point to a different URL or if you need to add additional query string parameters to the URL.

apply_filters( 'pre_term_link', string $termlink, WP_Term $term ) #

Filters the permalink structure for a term before token replacement occurs.


Parameters

$termlink

(string)The permalink structure for the term's taxonomy.

$term

(WP_Term)The term object.


Top ↑

Source

File: wp-includes/taxonomy.php

View on Trac



Top ↑

Changelog

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