[wp-trac] [WordPress Trac] #18897: query_posts / WP_query parameter 'offset' should play nicely with 'paged'

WordPress Trac noreply at wordpress.org
Wed Nov 12 07:00:48 UTC 2014


#18897: query_posts / WP_query parameter 'offset' should play nicely with 'paged'
------------------------------------------+-----------------------------
 Reporter:  here                          |       Owner:  wonderboymusic
     Type:  enhancement                   |      Status:  reopened
 Priority:  normal                        |   Milestone:  Future Release
Component:  Query                         |     Version:  3.2.1
 Severity:  normal                        |  Resolution:
 Keywords:  has-patch commit needs-codex  |     Focuses:
------------------------------------------+-----------------------------

Comment (by bradyvercher):

 I disagree with the characterization that the existing behavior is clearly
 a bug. In the majority of APIs I've used with an `offset` parameter, it's
 been a zero-based implementation, so every time I used it in `WP_Query`, I
 considered that the intended behavior and worked ''with'' it, not
 ''around'' anything I thought was a bug. I'm sure most developers working
 with it were under the same impression, which is why it took 6 years for
 anyone to bring it up.

 In any case, I haven't looked into how `WP_Comment_Query` and
 `WP_User_Query` handle it, but would those need to be updated as well if
 they exhibit the same behavior?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/18897#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list