[wp-trac] [WordPress Trac] #15905: Using wp_list_comments using both the type and callback arguments causes the first comment to be repeated
WordPress Trac
wp-trac at lists.automattic.com
Mon Dec 20 03:12:18 UTC 2010
#15905: Using wp_list_comments using both the type and callback arguments causes
the first comment to be repeated
--------------------------+-----------------------------
Reporter: benschell | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version:
Severity: normal | Keywords:
--------------------------+-----------------------------
I'm using wp_list_comments like so:
{{{
<ol class="commentlist">
<?php wp_list_comments('callback=comment_callback&type=comment');
?>
</ol>
}}}
When including the comments on a page listing many posts (like the home
index page), the callback function is always passed the first comment that
is encountered. Trying get_comments before wp_list_comments shows the
proper comments that should be displayed, but the callback always receives
the same comment as it's argument.
Removing '&type=comment' yields the expected output. My current
workaround is to remove '&type=comment' and only respond to comments with
an empty string for the comment_type in my comment callback function.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15905>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list