Make WordPress Core

Opened 2 years ago

Closed 21 months ago

Last modified 21 months ago

#34917 closed enhancement (duplicate)

Use meaningful variable names in wpLists

Reported by: helgatheviking Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch needs-testing dev-feedback
Focuses: javascript, administration Cc:


The wp-includes/js/wplists.js script is cryptic and unnecessarily difficult to read. Single letters, such as e, s, r, f, a, don't tell us anything about what the variable is, or what type of data it is containing, which ultimately makes this script really difficult to work with.

Is there anybody who can translate these variables? At least for the non-minified version?

Attachments (1)

34917.patch (21.8 KB) - added by rommelxcastro 21 months ago.
rename variables, add dockblocks

Download all attachments as: .zip

Change History (7)

#1 @DrewAPicture
2 years ago

+1 for self-documenting code, Let's do it.

#2 @DrewAPicture
2 years ago

  • Keywords needs-patch added

#3 @johnbillion
2 years ago

  • Version trunk deleted

21 months ago

rename variables, add dockblocks

#4 @rommelxcastro
21 months ago

  • Keywords has-patch needs-testing dev-feedback added; needs-patch removed

Here's a first draft, I renamed variables and added docblock to main functions.

next steps

  • apply code format
  • docblock anonymous functions
  • describe function functionality

#5 @helen
21 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

@rommelxcastro: I'm sorry this wasn't picked up as a duplicate earlier :( #36264 has a patch - I would love for you to take a look at it and see if you'd suggest any changes.

#6 @rommelxcastro
21 months ago

will do, thanks for the heads up @helen

Note: See TracTickets for help on using tickets.