[wp-trac] [WordPress Trac] #18897: query_posts / WP_query parameter 'offset' should play nicely with 'paged'
WordPress Trac
noreply at wordpress.org
Fri Nov 29 20:38:28 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 needs-codex |
------------------------------------------+-----------------------------
Comment (by bradyvercher):
I understand the point about the abstraction layer and offered up the
`paged_offset` alternative, but more importantly, developers also depend
on the API being stable. Making a breaking change like this undermines
confidence in the API. It's not just the Codex that needs updating, but
code in plugins, themes, tutorials, blog posts, support forums, and
countless sites. Do a search on GitHub, Google, WordPress Answers, the
WordPress.org support forums, or the plugin repository -- all of that code
will break and the benefits of this change are minor.
Using the other example I mentioned above, say I want 5 posts on the first
page of an archive and 10 on subsequent pages -- that's no longer possible
without allowing `offset` to be negative (attached patch allows for that).
In any case, these are just a couple of the uses I've come up with, who
knows what other scenarios rely on the old behavior.
Offset is a special arg that breaks things like paginated links and if
it's going to be used, then developers should understand the ramifications
and they should be clearly documented.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18897#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list