[wp-trac] [WordPress Trac] #35175: Page parameter no longer works in wp_list_comments
WordPress Trac
noreply at wordpress.org
Tue Dec 22 03:12:54 UTC 2015
#35175: Page parameter no longer works in wp_list_comments
-------------------------------+------------------------------
Reporter: smerriman | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: 4.4
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by boonebgorges):
Thanks, @smerriman. I now see what's happening.
> perhaps if the page being requested is not available, perform another
query at that point.
I think this is probably right. `wp_list_comments()` is a bit of a jumble,
and it would be nice to rethink it at some point so that it's more easily
maintainable down the line. But for the short term, I'd like to propose
something like [attachment:35175.diff]. It says: if `wp_list_comments()`
contains a 'page' param, and 'page' doesn't match the current cpage query
var, then query for all of the post's comments and let Walker do the
pagination. This technique misses out on some of the performance wins from
4.4 for standard comment queries, but it's on a par with 4.3 and earlier,
and it's far easier to implement for 4.4.1 than a more general overhaul.
Would you mind having a look and letting me know whether it accomplishes
what you need it to do? It needs a boatload more unit tests to cover all
the permutations of 'default_comment_page' etc, but it should give you an
idea of what I have in mind.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35175#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list