Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#11109 closed enhancement (fixed)

Upgrade SWFobject JS to 2.2

Reported by: niallkennedy's profile niallkennedy Owned by: azaozz's profile azaozz
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: JavaScript Keywords: has-patch, early
Focuses: Cc:


SWFObject 2.2 includes better compatibility with Internet Explorer, including DomContentLoaded emulation. The new version of the lib corrects Flash version detection and improves the Express Install process for browsers without the minimum required version needed to function. Full list of changes available on the SWFObject site.

Current WP version of SWFObject is 2.1. Coupled with SWFUpload on the admin side and called by plugins requesting dynamic SWF handling.

Attachments (1)

swfobject.diff (19.7 KB) - added by niallkennedy 14 years ago.
replace SWFObject.js v2.1 with v2.2.

Download all attachments as: .zip

Change History (5)

#1 @dimadin
14 years ago

  • Cc dimadin added
  • Milestone changed from Unassigned to 2.9

In plugins repository I saw that most plugins that use SWFObject use their own file and not enqueued one which is included with WordPress. One of rare plugins that enqueue it properly is Viper's Video Quicktags and because of it's hack I saw that its necessary for Viper's Video Quicktags and other plugins to use version 2.2.

Is there reason why this still hasn't been updated? If there isn't reason, could update be done for WP 2.9 so that we can encourage plugin authors to start using wp_enqueue_script?

I don't see anywhere in core WP that this file is used except in one very rare case described below. It is only used SWFObject script included with SWFUpload on upload screens: swfupload-all is enqueued that contains SWFObject script in itself; but if SCRIPT_DEBUG is turned on, then enqueuing of swfupload-all enqueue separate files (which are by default all in swfupload-all.js) and one of them is swfobject.js (you can see this in script-loader.php).

So in most cases swfobject.js is only used by plugins and they need latest version, so update is recommended.

(btw, SWFUpload too has newer version)

#2 @lloydbudd
14 years ago

  • Keywords early added
  • Milestone changed from 2.9 to 3.0

2.9 is already beta... SWFObject 2.2 is over a years worth of development since last version -- plenty of change.

Let's get this in early for 3.0.

#3 @Denis-de-Bernardy
14 years ago

  • Cc Denis-de-Bernardy added

#4 @ryan
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [12522]) Upgrade SWFobject JS to 2.2. Props niallkennedy. fixes #11109

Note: See TracTickets for help on using tickets.