apply_filters( ‘get_the_terms’, WP_Term[]|WP_Error $terms, int $post_id, string $taxonomy )

In this article

Filters the list of terms attached to the given post.

Parameters

$termsWP_Term[]|WP_Error
Array of attached terms, or WP_Error on failure.
$post_idint
Post ID.
$taxonomystring
Name of the taxonomy.

Source

$terms = apply_filters( 'get_the_terms', $terms, $post->ID, $taxonomy );

Changelog

VersionDescription
3.1.0Introduced.

User Contributed Notes

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