WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#11682 closed defect (bug) (invalid)

wp_list_comments with callback argument add plethora HTML tag

Reported by: pavolzetor Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.9
Component: Comments Keywords:
Focuses: Cc:

Description

wp_list_comments(array('style' => 'div', 'avatar_size' => 68, 'callback' => 'mytheme_comments'));

function mytheme_comments()
{
}

layout (after each comment is WTF tag):

<div class="commentlist">


</div><!-- WTF??? -->

</div>

Change History (1)

comment:1 dd324 years ago

  • Milestone Unassigned deleted
  • Resolution set to invalid
  • Status changed from new to closed

Thats due to the way nested comments are handled.

You also need to define 'end-callback' for the closing tag. The 'callback' function should NOT close the item, end-callback does that, to allow for nested comments to be within the comment div/ul/etc.

Note: See TracTickets for help on using tickets.