wpce_relation_list_terms v3.24.5
Filters the terms fetched on the relationslist endpoint.
Parameters
object[] $termsThe available terms, in the format returned by the ../../documentation/input-types/post input type.
Example
php
// Only keep terms with ID different from 1
add_filter('wpce_relation_list_terms', function (array $terms) {
return array_filter($terms, fn ($term) => $term->id !== 1);
});