The Theme Review Team is considering guidelines regarding handling of jQuery (and any other scripts bundled with and registered by WordPress core) by Repository-hosted Themes. We would like to gather input and feedback on the following discussion points:
- The first point for discussion is that Themes should always use the current version of jQuery as bundled with WordPress, so as to avoid core/Plugin breakage due to an unexpected version (whether older or newer than the WordPress-bundled version).
- The second point for consideration is that, if Themes should always use the current version of jQuery as bundled with WordPress, then Themes should not bundle their own version of jQuery, and should instead enqueue the core-bundled version, via wp_enqueue_script( ‘jquery’ ).
- The third – and likely, most controversial – point for discussion is that Themes should not deregister the core-bundled jQuery, in order to register a CDN-hosted, minified version of jQuery, as such functionality is better-left to the end user, via Plugin.
Note that Themes are currently already required to enqueue any custom scripts via wp_enqueue_script(), and to hook such scripts in wherever appropriate (primarily, either wp_head or wp_footer).
So, what are you thoughts on the above discussion points? What else do we need to consider, regarding handling of jQuery and other WordPress core-bundled scripts?