Make WordPress Core

Opened 13 years ago

Closed 10 years ago

#24988 closed enhancement (maybelater)

Cleanup for `/wp-admin/js/accordion.js`

Reported by: carldanley Owned by: morganestes
Priority: normal Milestone:
Component: General Version: 3.8
Severity: normal Keywords: has-patch needs-refresh needs-docs
Cc: Focuses: javascript

Description

I've attached a cleanup iteration of the existing accordion file.

  • Cleaner function names
  • Moved the structure of the file to a revealing module pattern
  • Added JSDocs
  • prefixed jQuery objects with proper $ sign
  • The current iteration has no publicly exposed API methods but I was thinking it might be nice to offer support for toggleAccordion etc. Need thoughts on this.

Could use a second pair of eyes to test this functionality and make sure we have no errors here.

Attachments (1)

accordion-cleanup.diff (5.1 KB ) - added by carldanley 13 years ago.

Download all attachments as: .zip

Change History (7)

#1 @DrewAPicture
13 years ago

  • Keywords has-patch added
  • Type defect (bug)enhancement

Looks like accordion-cleanup.diff is a good start. Would you mind adding a file header? I believe we added this in the last cycle (3.6).

#2 @jeremyfelt
13 years ago

  • Focuses javascript added

#3 @chriscct7
11 years ago

  • Keywords needs-refresh needs-docs added

This ticket was mentioned in Slack in #docs by morganestes. View the logs.


10 years ago

#5 @morganestes
10 years ago

  • Owner set to morganestes
  • Status newassigned

#6 @morganestes
10 years ago

  • Milestone Awaiting Review
  • Resolutionmaybelater
  • Status assignedclosed

I tried refreshing the existing patch, but it's diverged so much over the years that it doesn't make sense anymore. I'm going to say we close it for now, and if someone wants to revisit this, then we can reopen it then.

Note: See TracTickets for help on using tickets.