Opened 9 years ago
Last modified 3 years ago
#41678 new enhancement
Make sure all field returns use filters in WP Query
| Reported by: | spacedmonkey | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Query | Version: | 1.5 |
| Severity: | normal | Keywords: | has-patch needs-unit-tests dev-feedback |
| Cc: | Focuses: |
Description
Currently if fields is set to either id or id=>parent, it doesn't run through all the filters as these return early.
Attachments (1)
Change History (4)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 41678.diff code has be refactored to run through more filters.
Key features
posts_results_idsfor query of 'ids', to get a filter of result of query. Useful for caching plugins. This new filter is added, asposts_resultsexpects an array ofWP_Postobjects.the_posts,posts_results,posts_request_idsandsplit_the_query.This patch will be extremely useful for a plugin like elasticpress.