[wp-trac] [WordPress Trac] #26041: jshint shouldn't throw errors: wp-includes/js/plupload/handlers.js

WordPress Trac noreply at wordpress.org
Fri Nov 15 05:54:43 UTC 2013


#26041: jshint shouldn't throw errors: wp-includes/js/plupload/handlers.js
--------------------------+------------------------------
 Reporter:  mdbitz        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Build Tools   |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by nacin):

 This is an old file. Its structure (if you can call it that) came from
 swfupload/handlers.js. We copied that and then changed it up for Plupload
 in 3.3. In 3.4, a new API was written for the customizer, `wp-
 includes/js/plupload/wp-plupload.js`. In 3.5, that API was updated and
 used for the new media library. So this is only used for media-new.php. It
 would be nice to eventually delete these files, for sure. With that in
 mind, it would be best if this file is left as pristine as possible for
 code spelunking purposes. So:

  1. Let's comment out the BeforeUpload.

  2. Let's remove the parameters. If we ignore the entire function, we'll
 then need to remove the reference to deleteError as well.

  3. Normally we would mark these as "exported". It looks like dndHelper is
 *not* from SWFUpload, and instead came from the project that added
 Plupload to core. It was accidental, essentially, and we can yank it.
 fileDialogStart was used only through 3.2 when we had SWFUpload; it was
 copied over to here in 3.3. Anyone trying to use it will be using the
 SWFUpload handlers, which includes a function of the same name. It can
 also be removed.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/26041#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list