[wp-trac] [WordPress Trac] #18897: query_posts / WP_query parameter 'offset' should play nicely with 'paged'
WordPress Trac
noreply at wordpress.org
Tue Nov 26 19:14:57 UTC 2013
#18897: query_posts / WP_query parameter 'offset' should play nicely with 'paged'
------------------------------+-----------------------------
Reporter: here | Owner: wonderboymusic
Type: enhancement | Status: reopened
Priority: normal | Milestone: 3.8
Component: Query | Version: 3.2.1
Severity: normal | Resolution:
Keywords: has-patch commit |
------------------------------+-----------------------------
Comment (by here):
In my opinion, having a query_posts() function that is consistent with the
expected WP_Query Parameters is worth it going forward.
The only "breaking" change would be code that uses both `paged` and
`offset`, which is *currently* broken, due to this bug. Further, anyone
working with query_posts today with be confounded by this unexpected and
undocumented bug. As far as I know, this is the only example of WP_Query
Parameters not working with query_posts(). This still seems worth fixing.
Since query_posts() silently ignores `paged` if `offset` is used -- I
wonder how you would have code that would break. If you had previously
coded something to work around this, you would have had to choose one or
the other, not both. As such, most workarounds will continue to work
after this patch. Can you give a more specific example of where you
expect this patch to break something in your own code ?
Surely there are a number of folks who have used `paged` and `offset`
together, and never noticed that `paged` was being ignored. This code
might break -- but such code is *already* acting in a way inconsistent
with expected function action (`paged` is ignored). Again, seems worth
fixing for past and future.
http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18897#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list