Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#44520 closed defect (bug) (fixed)

Fix default parameters in controls.js JSDoc.

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

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 6 years ago.

Download all attachments as: .zip

Change History (4)

#1 @atimmer
6 years 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
6 years ago

  • Milestone changed from Awaiting Review to 5.0

#3 @johnbillion
6 years ago

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