Make WordPress Core

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#34917 closed enhancement (duplicate)

Use meaningful variable names in wpLists

Reported by: helgatheviking's profile 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 8 years ago.
rename variables, add dockblocks

Download all attachments as: .zip

Change History (7)

#1 @DrewAPicture
9 years ago

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

#2 @DrewAPicture
9 years ago

  • Keywords needs-patch added

#3 @johnbillion
9 years ago

  • Version trunk deleted

8 years ago

rename variables, add dockblocks

#4 @rommelxcastro
8 years 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
8 years 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
8 years ago

will do, thanks for the heads up @helen

Note: See TracTickets for help on using tickets.