Make WordPress Core

Opened 11 years ago

Closed 11 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:


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??? -->


Change History (1)

#1 @dd32
11 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.