get_object_terms WordPress Filter Hook
The get_object_terms hook is used to retrieve the terms associated with a given object. This hook is called when the get_terms function is used to retrieve terms for a specific object.
apply_filters( 'get_object_terms', WP_Term[] $terms , int[] $object_ids , string[] $taxonomies , array $args ) #
Filters the terms for a given object or objects.
Parameters
- $terms
(WP_Term[])Array of terms for the given object or objects.
- $object_ids
(int[])Array of object IDs for which terms were retrieved.
- $taxonomies
(string[])Array of taxonomy names from which terms were retrieved.
- $args
(array)Array of arguments for retrieving terms for the given object(s). See wp_get_object_terms() for details.
Source
File: wp-includes/taxonomy.php
Changelog
Version | Description |
---|---|
4.2.0 | Introduced. |