[wp-trac] [WordPress Trac] #13939: get_page_of_comment returns wrong page number when changing threading level
WordPress Trac
wp-trac at lists.automattic.com
Sun Jun 27 17:07:01 UTC 2010
#13939: get_page_of_comment returns wrong page number when changing threading level
--------------------------+-------------------------------------------------
Reporter: laceous | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Triage
Component: Comments | Version: 3.0
Severity: normal | Keywords: has-patch needs-testing
--------------------------+-------------------------------------------------
Comment(by laceous):
I found a couple more issues with the get_page_of_comment function. Here's
a quick recap:
1. When calling this function from the init action,
get_query_var('comments_per_page') isn't available yet.
get_option('comments_per_page') is, however. This isn't a deal-breaker
because you can pass in an arg to override comments_per_page.
2. If you have threaded comments and then disable threading, the comment
page returned can be incorrect. (initial issue reported; ignore the x to
x-n... I was wrong there)
3. The comment type was not allowing "pings" which is one of the values
wp_list_comments allows
4. This function wasn't taking into account unapproved comments for the
current user like the comments_template function does.
5. There's lots of ways to customize how comments are displayed (custom
walkers, callbacks, filters, etc) so it makes sense to return with a
filter from this function.
The patch I just submitted attempts to correct these issues.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13939#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list