WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#11109 closed enhancement (fixed)

Upgrade SWFobject JS to 2.2

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

Description

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 4 years ago.
replace SWFObject.js v2.1 with v2.2. http://code.google.com/p/swfobject/source/browse/trunk/swfobject/swfobject.js

Download all attachments as: .zip

Change History (5)

comment:1 dimadin4 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)

comment:2 lloydbudd4 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.

comment:3 Denis-de-Bernardy4 years ago

  • Cc Denis-de-Bernardy added

comment:4 ryan4 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.