[wp-trac] [WordPress Trac] #15410: filter for get_the_terms
WordPress Trac
wp-trac at lists.automattic.com
Fri Nov 12 21:31:39 UTC 2010
#15410: filter for get_the_terms
--------------------------+-------------------------------------------------
Reporter: filosofo | Owner: filosofo
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.1
Component: Taxonomy | Version: 3.1
Severity: normal | Keywords: has-patch
--------------------------+-------------------------------------------------
`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.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15410>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list