#27763 closed defect (bug) (fixed)
Plupload 2.x Compatibility
Reported by: | kovshenin | Owned by: | kovshenin |
---|---|---|---|
Milestone: | 3.9 | Priority: | highest omg bbq |
Severity: | major | Version: | 3.9 |
Component: | External Libraries | Keywords: | has-patch |
Focuses: | Cc: |
Description
Three things we can do here to cause less plugin breakage:
- Rename Moxie.swf and .xap back to what they were in 3.8. Some plugins may be referencing these directly, because there's no easier way to get an array of core's default settings for Plupload.
- Make wp_plupload_default_settings() more generic, so developers can use it to get an array of default settings for Plupload. Currently you can call it only once and it adds a JS object to the wp-plupload handle. Doesn't return anything.
- Bring back the plupload-{runtime} script handles. Apparently some folks are using these in dependency arrays.
Attachments (3)
Change History (14)
#2
@
11 years ago
- Owner set to kovshenin
- Priority changed from high to highest omg bbq
- Status changed from new to assigned
1 and 3 are easy wins. I'm for 2 as well, for sure.
#3
@
11 years ago
3 makes sense. 2 would be good too. Not so sure about renaming parts of an external library... A quick search shows about 120 plugins that contain 'plupload.flash.swf'
. The only alternative seems to be to copy Moxie.swf and Moxie.xap and rename them to plupload.flash.swf and plupload.silverlight.xap, show deprecated notice somehow, and remove them in 4.0.
#4
@
11 years ago
- Keywords has-patch added; needs-patch removed
At this point, Plupload's new naming convention matters very little to me. 27763.diff moves them back, makes plupload
the primary handle, and makes the rest of the old handles aliases.
I don't have an immediate solution to wp_plupload_default_settings(). It'd probably need a minimum of three arguments: $handle = 'wp-plupload', $js_variable = '_wpPluploadSettings', $args = array()
. The args can then be merged into defaults. Or, a new wp_plupload_settings() function that abstracts this.
#5
@
11 years ago
Patch looks good. 27763.2.diff also changes back the names in the Plupload settings for the Media -> Add New screen.
+1 for wp_plupload_settings()
that will be used in both wp_plupload_default_settings()
in wp-includes/media.php and media_upload_form()
in wp-admin/includes/media.php. Can probably add that in 4.0.
#8
@
11 years ago
We can introduce a better method for plugin developers in 4.0, but wp_plupload_default_settings() is not a simple function so I don't know if we can or should rush in an abstraction. [28108] restores backwards compatibility for 3.9, so anything anyone has been doing *should* just continue to work. (Rarst, please confirm?)
If we missed anything back-compat wise, please reopen this ticket. Otherwise, can someone make a new ticket for wp_plupload_settings()? Thanks!
Cross-referencing http://wordpress.stackexchange.com/questions/141030/how-to-make-plupload-zones-that-will-survive-changes-in-core?stw=2.