filter for get_the_terms
|Reported by:||filosofo||Owned by:||filosofo|
get_the_terms() really needs a filter, because it pulls data when available directly from the cache.
That means that to reliably filter the terms based on the context in which they're being used, you have to filter it downstream in the functions that are calling it, which doesn't always work well.
For example, get_the_term_list() calls get_the_terms(), but the filter for get_the_term_list() comes too late to prevent a return value; filtering out the terms there will still return the before and after strings.