[wp-trac] [WordPress Trac] #35381: Introduce `WP_Term_Query`
WordPress Trac
noreply at wordpress.org
Mon May 23 13:17:28 UTC 2016
#35381: Introduce `WP_Term_Query`
--------------------------------------------------+------------------
Reporter: boonebgorges | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.6
Component: Taxonomy | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing dev-feedback | Focuses:
--------------------------------------------------+------------------
Comment (by flixos90):
Replying to [comment:10 boonebgorges]:
> Querying for term IDs, rather than full term objects, is something I
would absolutely like to do. See #34239. But I feel that if we insist on
it as a prerequisite for `WP_Term_Query`, it's going to hold up the
current ticket forever. So I've rolled that change out in
[attachment:35381.2.diff].
That makes sense to me as well. But let's deal with that in a later
ticket. We should query only IDs at some point and by doing this also in a
way align the behavior of this class with the other recent query classes.
It will probably still cause some issues with backwards compatibility
though, but at least we already have `WP_Term_Query` then.
> * Some of the bits of argument parsing that you'd left in `get_terms()`,
I moved to `WP_Term_Query`. I think we need most of it in every case where
we're fetching terms. If you disagree, I'd be interested to hear the
reasons.
It's only the check for hierarchical taxonomies that you moved right? I
can't quite remember why I left it in there, but looking at it now, I
agree moving it into the class.
Looking good so far. What should be the next steps here? Can we start
thinking about `get_the_terms()` yet?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35381#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list