WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#37239 closed defect (bug) (fixed)

Correction for the docs of wp_list_authors()

Reported by: birgire Owned by: SergeyBiryukov
Milestone: 4.6 Priority: normal
Severity: normal Version: 4.0
Component: Users Keywords: has-patch
Focuses: docs Cc:
PR Number:

Description

Regarding the wp_list_author() docs:

  • The description of exclude is duplicated but there's none of include.
  • The input type for include and exclude can be either a string or an array. (see wp_parse_list_id() ). Currently it's documented only as a string.

Attachments (2)

author-template.diff (5.2 KB) - added by birgire 4 years ago.
37239-2.diff (5.4 KB) - added by birgire 4 years ago.
Without alphabetical ordering

Download all attachments as: .zip

Change History (8)

#1 @birgire
4 years ago

  • Keywords has-patch added

Regarding the patch: I additionally improved the readability (alphabetical order + one argument per line)

#2 @rachelbaker
4 years ago

  • Keywords needs-refresh added
  • Milestone changed from Awaiting Review to Future Release
  • Version changed from trunk to 4.0

@birgire Thanks for the patch. Let's keep the patch limited to the changes for the @include and @exclude params. Can you refresh it without the alphabetical re-ordering?

#3 @rachelbaker
4 years ago

Introduced in [28909]. See #28684

@birgire
4 years ago

Without alphabetical ordering

#4 @birgire
4 years ago

@rachelbaker sure, I updated the patch without the alphabetical ordering.

ps:

What's the preferred order?

I'm not sure pure code readability adjustments, like

  • alphabetical ordering of array arguments
  • single argument per line in an array

are accepted as tickets, so I added them here with this ticket ;-)

Mainly because I think it makes it easier (in general) to skim through the core code.

#5 @SergeyBiryukov
4 years ago

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

In 37949:

Docs: In wp_list_authors(), clarify that include and exclude arguments can also be an array.

Fix duplicated exclude argument description.

Props birgire.
Fixes #37239.

#6 @SergeyBiryukov
4 years ago

  • Keywords needs-refresh removed
  • Milestone changed from Future Release to 4.6
Note: See TracTickets for help on using tickets.