[wp-trac] [WordPress Trac] #38703: parse_search() before pre_get_posts hook
WordPress Trac
noreply at wordpress.org
Tue Nov 8 02:29:55 UTC 2016
#38703: parse_search() before pre_get_posts hook
-------------------------+-----------------------------
Reporter: drzraf | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: trunk
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
When hooking `pre_get_posts()`, `$query->get('s')` may be of interest (in
order, eg, to change some meta condition).
But it's currently not possible because this `query_vars` is initialized
far later in the `get_posts()` workflow (by `parse_search()`).
Is there anything which keeps core from doing `parse_search()` earlier?
If not, could we provide `query_vars['s']` to implementers of
`pre_get_posts`?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38703>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list