Javascript changes in 3.3
Now that WordPress 3.3 is in feature freeze, it’s time to have a look at some new Javascript goodies for developers:
- jQuery 1.6.4 and jQuery UI 1.8.16. And that’s the full UI including widgets and effects. This will make it a lot easier and simpler for plugins using UI components that are not used in core as they will be able to just enqueue whatever they need.
Note: there is a known bug/regression in UI Draggable since version 1.8.13. When connecting a draggable item to a sortable container, the HTML ID of the item is removed, #17952. - WordPress Editor API. This is an updated API for both TinyMCE and Quicktags that outputs all parts of both editors in the same way as used on the Add / Edit Post screens, #17144. Plugins will be able to use the WordPress editor anywhere including the Visual/HTML tabs and the links to upload files and show the media library.
- Quicktags refactoring. This was necessary in order to make it fully multi-instance compatible, #16695.
Note: if your plugin adds a Quicktags button please enhance it to use the new methods in quicktags.js. - New multi-file uploader. Plupload was included as a result of Google Summer of Code project, #18206. It’s more stable and has a lot more features as well as chooses the best available interface that the current browser supports: HTML 5, Silverlight or Flash.
Note: two actions that were specific to SWFUpload were renamed and there is a new filter ‘plupload_init’ that gives access to all initialization options. - Other enhancements: wp_enqueue_script() now works mid-page and prints the late enqueued scripts in the footer #9346, wp_localize_script() uses json_encode to properly escape and output all strings, #11520.
Scott Kingsley Clark 2:18 pm on September 23, 2011 Permalink |
We were using a very early version of #2 and it’s been working great, excited to integrate the full 3.3 Editor API and have it work to the full extent we and plenty of other hungry developers have waited for
Conor Hughes 2:00 pm on September 26, 2011 Permalink |
Question about plupload, Does it include the option to spilt the upload in to samller chunks? So basicly does core included all the feature of the wplupload plugin https://wordpress.org/extend/plugins/wplupload/
Andrew Ozz 7:17 pm on September 28, 2011 Permalink |
No that’s not enabled by default but can be set by a plugin. Seems only Chrome handles splitting the file into chunks properly at the moment. It would have been nice to remove the upload size limit
When more browsers start to support this reliably we can enable it by default, probably 3.4.
Conor Hughes 7:39 pm on September 28, 2011 Permalink
Currently using the plugin and file spliting works in opera and Firefox 6+, However I am using the flash runtime not HTML5.
Stas Sușcov 7:47 pm on September 27, 2011 Permalink |
Great news on Editor API and `wp_localize_script()`!!!
Jason Penney 8:05 pm on September 28, 2011 Permalink |
Glad to see the full jQuery UI (also, looks like I picked the correct script names in Use Google Libraries way back, so I won’t need to make changes in there when 3.3 comes out).
Joerg 9:59 am on September 30, 2011 Permalink |
I hope the TinyMCE editor will offer tables in WP by standard so that I would not need to install any plugins anymore….
Andrew Ozz 4:10 pm on September 30, 2011 Permalink |
No, the default TinyMCE configuration in core has not changed. Most functions related to it were combined in WP_Editor class.
Max 9:14 am on November 4, 2011 Permalink |
Too late for jQuery 1.7?
Mika "Ipstenu" Epstein 2:24 pm on November 16, 2011 Permalink |
1.7′s already in – though that’s another kettle of fish.