Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#51652 closed enhancement (fixed)

Inconsistent naming in JavaScript function

Reported by: ribaricplusplus Owned by: SergeyBiryukov
Priority: normal Milestone: 5.6
Component: Customize Version: 4.0
Severity: trivial Keywords: has-patch
Cc: Focuses: javascript, coding-standards

Description

This is my first ticket, sorry if I'm doing something wrong.

The name for a function parameter in the doc comment is not the same as the actual function parameter.

I know this is extremely trivial but I was reading through core source code and I figured submitting a fix would be worthwhile to get me comfortable with the contributing process.

Attachments (1)

51652.diff​ (656 bytes ) - added by ribaricplusplus 6 years ago.

Download all attachments as: .zip

Change History (6)

#1 follow-up: @davidbaumwald
6 years ago

  • Version trunk → 4.0

Hi @ribaricplusplus and welcome to Core Trac! Great catch!

This goes back to this commit back in the 4.0 cycle. Interestingly, the docs directly above the method refer to the param as staticProps.

#2 @SergeyBiryukov
6 years ago

  • Component General → Customize
  • Milestone Awaiting Review → 5.6
  • Owner set to SergeyBiryukov
  • Status new → reviewing

Thanks for the patch, this looks good :)

#3 in reply to: ↑ 1 @ribaricplusplus
6 years ago

  • Component Customize → General

Replying to davidbaumwald:

Hi @ribaricplusplus and welcome to Core Trac! Great catch!

This goes back to this commit back in the 4.0 cycle. Interestingly, the docs directly above the method refer to the param as staticProps.

Thank you for the help.

I appreciate the warm welcome :)

#4 @SergeyBiryukov
6 years ago

  • Component General → Customize

Just noting that [29450] only added the documentation, the function itself was added earlier in [19995].

#5 @SergeyBiryukov
6 years ago

  • Resolution → fixed
  • Status reviewing → closed

In 49353:

Customize: Update parameter name in api.Class.extend().

This makes the name consistent with the documentation and the inherits() function signature.

Props ribaricplusplus, davidbaumwald.
Fixes #51652.

Note: See TracTickets for help on using tickets.