[wp-trac] [WordPress Trac] #41246: Filter to short circuit term query 'terms_pre_query'

WordPress Trac noreply at wordpress.org
Sun Jul 30 15:28:47 UTC 2017


#41246: Filter to short circuit term query 'terms_pre_query'
-------------------------+-----------------------------
 Reporter:  jarocks      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  Taxonomy     |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+-----------------------------
Changes (by boonebgorges):

 * milestone:  Awaiting Review => Future Release


Comment:

 Hi @jarocks - Thanks for the ticket! I like the idea.

 For reference, #36687 was the ticket that introduced `posts_pre_query`.

 I'm unsure off the top of my head how best to handle all the post-query-
 processing that happens in `WP_Term_Query`. By way of comparison,
 `WP_Query` continues to perform all of its own `post_status` post-
 processing on posts provided by external data sources. We want to try to
 strike a balance between total customizability on the one hand, and giving
 developers all the conveniences of core queries on the other.

 As a way forward, could I suggest that you write a sample implementation?
 It's fine to use dummy data, of course. But I think it would be very
 helpful to get a sense of how the filter would work best. Ideally, the
 dummy data would be hierarchical, so we can get a sense of how count
 padding etc would work in practice. Since the data doesn't like in WP,
 it's likely that the callback function will *have* to handle all of this
 stuff, but it'll be a helpful exercise to see this in practice.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41246#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list