[wp-trac] [WordPress Trac] #35175: Page parameter no longer works in wp_list_comments

WordPress Trac noreply at wordpress.org
Wed Jan 13 03:57:08 UTC 2016


#35175: Page parameter no longer works in wp_list_comments
--------------------------+---------------------------
 Reporter:  smerriman     |       Owner:  boonebgorges
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.4.1
Component:  Comments      |     Version:  4.4
 Severity:  normal        |  Resolution:  fixed
 Keywords:  fixed-major   |     Focuses:
--------------------------+---------------------------

Comment (by smerriman):

 @boonebgorges - sorry for the lack of response before - didn't have as
 much access over the holidays. The patch does seem to solve all of my use
 cases, and you were correct about `reverse_top_level` - I had mistakenly
 thought it reversed prior to calculating pages, but that still works fine.

 There is a change in behaviour if the `type` variable is passed though -
 if I take the above example of 5 comments, make the third one a track, and
 add a second `wp_list_comments` call passing `type=trackback`, the
 trackback would previously appear on page 1; now it appears on page 2.

 I'm not entirely sure which behaviour is more logical - initially I
 thought a `wp_list_comments('type=trackback')` should list the first x
 trackbacks, but on the other hand you can't use proper pagination on
 trackbacks alone to begin with. So I can't decide whether it's a bug.

 In either case, should a separate ticket be opened for a more performant
 fix be opened? I suspect the optimal route will be something similar to
 `pre_get_posts` for comments, so you can alter the query without needing
 to ignore the first one and re-query everything.

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


More information about the wp-trac mailing list