Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#52839 closed defect (bug) (fixed)

Docs: indentation error on `wp_term_query->construct` method parameters

Reported by: audrasjb's profile audrasjb Owned by: davidbaumwald's profile davidbaumwald
Milestone: 5.8 Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords: has-patch commit
Focuses: docs Cc:

Description

There is a minor indentation issue in some wp_term_query->construct method DocBlock params.

The issue appears on the fields param. Indeed, it's better to avoid dashes when items should not be presented as a bullet list. Better to replace - with * as per DocBlock formatting rules.

https://developer.wordpress.org/reference/classes/wp_term_query/__construct/

Props @whyisjake for pointing this out in DevHub user notes.

Attachments (2)

Capture d’écran 2021-03-17 à 18.54.14.png (240.7 KB) - added by audrasjb 4 years ago.
52839.diff (5.7 KB) - added by audrasjb 4 years ago.
Docs: Correct formatting for the description of some wp_term_query->construct method parameters

Download all attachments as: .zip

Change History (7)

@audrasjb
4 years ago

Docs: Correct formatting for the description of some wp_term_query->construct method parameters

#1 @audrasjb
4 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
4 years ago

  • Milestone changed from Awaiting Review to 5.8

#3 @SergeyBiryukov
4 years ago

  • Keywords commit added

Related: [50538] / #52836.

Just noting that it's possible that replacing - with * as in [50538] may not actually fix the issue, and it could be a bug not in core, but in the DevHub documentation parser itself, as there are a few other instances where the - characters are converted to second-level list items as expected.

I don't have a quick way to test that at the moment, so I guess we'll have to wait and see after 5.8 :) 52839.diff should be good to go in the meantime.

Last edited 4 years ago by SergeyBiryukov (previous) (diff)

#4 @davidbaumwald
4 years ago

  • Owner set to davidbaumwald
  • Status changed from new to accepted

#5 @davidbaumwald
4 years ago

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

In 50614:

Docs: Fix indentation for wp_term_query->construct method parameters.

The fields and orderby properties in WP_Term_Query are arrays and each accepts a variety of keys. To properly indent each key in the docblock, a * should be used, not -.

Props whyisjake, audrasjb, SergeyBiryukov.
Fixes #52839.

Note: See TracTickets for help on using tickets.