Make WordPress Core

Opened 10 months ago

Closed 3 months ago

#49181 closed defect (bug) (fixed)

Clarify accepted values for style argument in wp_list_comments()

Reported by: jeremyfelt Owned by: SergeyBiryukov
Milestone: 5.5 Priority: normal
Severity: normal Version:
Component: Comments Keywords: good-first-bug has-patch
Focuses: docs Cc:


wp_list_comments() accepts style as part of the arguments it passes to the comment walker to determine how a list of comments should be displayed.

  • If div is passed, no markup is output in the walker's start_lvl() method.
  • If ol is passed, ol markup is output.
  • If ul or any other value is passed, ul markup is output.

The functions docs imply right now that only ol and ul are valid. It should clarify that div will result in no additional list markup.

Attachments (1)

00000.diff (1.0 KB) - added by liuhaibin 8 months ago.

Download all attachments as: .zip

Change History (7)

#1 @functionalrhyme
8 months ago

The documentation can be found here:

The code is here:

8 months ago

#2 @liuhaibin
8 months ago

I've attached the patch. My very first one. Please take a look. Thanks.

#3 @SergeyBiryukov
7 months ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Awaiting Review to 5.5
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#4 @liuhaibin
7 months ago

I should have named the patched as 49181.diff. But to avoid duplication, I did not upload the same patch again with another name.

#5 @liuhaibin
7 months ago

Hi, is there anything that I can do to move the ticket forward?

#6 @SergeyBiryukov
3 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 48597:

Docs: Improve documentation for wp_list_comments().

Note that passing div to the style parameter will result in no additional list markup.

Props liuhaibin, jeremyfelt, functionalrhyme.
Fixes #49181.

Note: See TracTickets for help on using tickets.