Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#38371 closed defect (bug) (fixed)

PHP documentation for wp_list_comments parameter reverse_top_level is incorrect

Reported by: bcole808's profile bcole808 Owned by: boonebgorges's profile boonebgorges
Milestone: 4.7 Priority: normal
Severity: normal Version: 4.7
Component: Comments Keywords:
Focuses: docs Cc:

Description

The PHP docs for the parameter currently reads:

@type string $reverse_top_level Ordering of the listed comments. Default null. Accepts 'desc', 'asc'.

however in reading how this parameter is used, it must be set to a boolean value. Using the string "desc" or "asc" will cause the function to always show the oldest comments first, as it gets converted to a boolean value.

Attached is a patch to update the docs to reflect actual behavior.

Attachments (1)

38371.patch (1.0 KB) - added by bcole808 7 years ago.

Download all attachments as: .zip

Change History (3)

@bcole808
7 years ago

#1 @boonebgorges
7 years ago

  • Milestone changed from Awaiting Review to 4.7

Hi @bcole808 - Thanks for the ticket and the patch. Looks good to me.

Introduced in [25567].

#2 @boonebgorges
7 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 38845:

Comments: Fix description for reverse_top_level argument in wp_list_comments().

It's a boolean, not a string. Introduced in [25567].

Props bcole808.
Fixes #38371.

Note: See TracTickets for help on using tickets.