get_term WordPress Filter Hook

The get_term hook is used to retrieve a given term object. It is called when a term is being retrieved from the database. This hook can be used to alter the terms retrieved from the database. For example, if you want to add custom data to a term, you can use this hook to do so.

apply_filters( 'get_term', WP_Term $_term, string $taxonomy ) #

Filters a taxonomy term object.


Description

The ‘get_$taxonomy’ hook is also available for targeting a specific taxonomy.


Top ↑

Parameters

$_term

(WP_Term)Term object.

$taxonomy

(string)The taxonomy slug.


Top ↑

Source

File: wp-includes/taxonomy.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.0$_term is now a WP_Term object.
2.3.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