WordPress.org

Make WordPress Core

Opened 17 months ago

Closed 17 months ago

Last modified 13 months ago

#44520 closed defect (bug) (fixed)

Fix default parameters in controls.js JSDoc.

Reported by: herregroen Owned by: atimmer
Milestone: 5.1 Priority: normal
Severity: normal Version: 5.1
Component: Customize Keywords: has-patch
Focuses: javascript, docs Cc:
PR Number:

Description

While JSDoc technically supports the @param {string=} optional or @param {string=} [optional] style of setting optional parameters.

It does unfortunately not support @param {string=default} optional or @param {string=default} [optional] style of default parameters.

Instead, as the JSDoc standards recommend, the following should be used:
@param {string} [optional] or @param {string} [optional=default].

src/js/_enqueues/wp/customize/controls.js still contains several notations of the incorrect style.

Attachments (1)

customize-controls-jsdoc.patch (5.9 KB) - added by herregroen 17 months ago.

Download all attachments as: .zip

Change History (4)

#1 @atimmer
17 months ago

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

In 43391:

Docs: Fix default values for customize/controls.js.

The old values cannot be parsed by JSDoc.

Props herregroen.
Fixes #44520.

#2 @netweb
16 months ago

  • Milestone changed from Awaiting Review to 5.0

#3 @johnbillion
13 months ago

  • Milestone changed from 5.0 to 5.1
Note: See TracTickets for help on using tickets.