get_term filter-hook . WP 2.3.0
Filters a taxonomy term object.
The 'get_(taxonomy)' hook is also available for targeting a specific taxonomy.
Usage
add_filter( 'get_term', 'filter_function_name_2005', 10, 2 ); function filter_function_name_2005( $_term, $taxonomy ){ // filter... return $_term; }
- $_term(WP_Term)
- Term object.
- $taxonomy(string)
- The taxonomy slug.
Changelog
Since 2.3.0 | Introduced. |
Since 4.4.0 | $_term is now a WP_Term object. |
Where the hook is called
get_term
wp-includes/taxonomy.php 898
$_term = apply_filters( 'get_term', $_term, $taxonomy );
Where in WP core the hook is used WordPress
wp-includes/taxonomy.php 26
add_filter( 'get_term', 'sync_category_tag_slugs', 10, 2 );