[wp-trac] [WordPress Trac] #36687: Feature to override WP_Query to provide results from other source
WordPress Trac
noreply at wordpress.org
Tue Jun 21 16:46:50 UTC 2016
#36687: Feature to override WP_Query to provide results from other source
-----------------------------+--------------------------
Reporter: jpdavoutian | Owner: jpdavoutian
Type: feature request | Status: closed
Priority: normal | Milestone: 4.6
Component: Query | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses:
-----------------------------+--------------------------
Comment (by romulodl):
About the solution, should not be better to create a filter called
`use_wp_query` just after `pre_get_posts` function and add an early return
in case of being `false`?
The proposed solution is ok, but IMO it would be very confusing for a dev
navigate on which filter needs to be hooked if you want to return from
another source database or if you're caching the results (which was my
pain creating a post cache plugin for memcache.)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36687#comment:31>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list