Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#51652 closed enhancement (fixed)

Inconsistent naming in JavaScript function

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

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

Download all attachments as: .zip

Change History (6)

#1 follow-up: @davidbaumwald
4 years ago

  • Version changed from trunk to 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
4 years ago

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

Thanks for the patch, this looks good :)

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

  • Component changed from Customize to 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
4 years ago

  • Component changed from General to Customize

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

#5 @SergeyBiryukov
4 years ago

  • Resolution set to fixed
  • Status changed from reviewing to 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.