apply_filters( ‘wp_get_object_terms’, WP_Term[]|int[]|string[]|string $terms, string $object_ids, string $taxonomies, array $args )

In this article

Filters the terms for a given object or objects.

Description

The $taxonomies parameter passed to this filter is formatted as a SQL fragment. The ‘get_object_terms’ filter is recommended as an alternative.

Parameters

$termsWP_Term[]|int[]|string[]|string
Array of terms or a count thereof as a numeric string.
$object_idsstring
Comma separated list of object IDs for which terms were retrieved.
$taxonomiesstring
SQL fragment of taxonomy names from which terms were retrieved.
$argsarray
Array of arguments for retrieving terms for the given object(s). See wp_get_object_terms() for details.
More Arguments from wp_get_object_terms( … $args )See WP_Term_Query::__construct() for supported arguments.

Source

return apply_filters( 'wp_get_object_terms', $terms, $object_ids, $taxonomies, $args );

Changelog

VersionDescription
2.8.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.