[wp-trac] [WordPress Trac] #35402: per_page parameter no longer works in wp_list_comments

WordPress Trac noreply at wordpress.org
Fri Jan 15 19:47:19 UTC 2016


#35402: per_page parameter no longer works in wp_list_comments
--------------------------+---------------------------
 Reporter:  Ninos Ego     |       Owner:  boonebgorges
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.4.2
Component:  Comments      |     Version:  4.4.1
 Severity:  major         |  Resolution:  fixed
 Keywords:                |     Focuses:  template
--------------------------+---------------------------
Changes (by boonebgorges):

 * owner:   => boonebgorges
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"36324"]:
 {{{
 #!CommitTicketReference repository="" revision="36324"
 Respect custom pagination params when using `wp_list_comments()` in a
 query loop.

 [36157] fixed a problem, introduced in 4.4, that caused custom pagination
 parameters passed to `wp_list_comments()`. However, the fix introduced in
 that
 changeset was limited to the `is_singular()` context, so that the bug
 remained
 when `wp_list_comments()` is used within a non-singular `WP_Query` loop.
 We
 fix this by removing the `is_singular()` check and using the more general
 `get_the_ID()` to identify the correct post_id to use for the secondary
 comment query.

 Fixes #35402.
 }}}

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


More information about the wp-trac mailing list