[wp-trac] [WordPress Trac] #19631: Consider a doing_it_wrong call for query_posts()
WordPress Trac
noreply at wordpress.org
Fri May 23 20:35:37 UTC 2014
#19631: Consider a doing_it_wrong call for query_posts()
-------------------------+-----------------------------
Reporter: johnbillion | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone: Future Release
Component: Query | Version:
Severity: minor | Resolution:
Keywords: close | Focuses:
-------------------------+-----------------------------
Comment (by SergeyBiryukov):
Replying to [comment:9 rmccue]:
> Along those lines, maybe we could have something like:
>
> {{{
> function wp_modify_query($args) {
> add_filter('pre_get_posts', function ($query) use ($args) {
> return array_merge($query, $args);
> });
> }
> }}}
>
> (Obviously with 5.2 syntax, this is just for demonstration)
Looks like this function would have a very limited use, since there's no
way to use conditional tags with it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/19631#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list