Opened 13 years ago
Closed 13 years ago
#15410 closed defect (bug) (fixed)
filter for get_the_terms
Reported by: | filosofo | Owned by: | filosofo |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | Taxonomy | Keywords: | has-patch |
Focuses: | Cc: |
Description
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.
Attachments (1)
Change History (2)
Note: See
TracTickets for help on using
tickets.
(In [16342]) Add 'get_the_terms' filter. Props filosofo. Fixes #15410