Topic For Discussion: jQuery

The Theme Review Team is considering guidelines regarding handling of jQuery (and any other scripts bundled with and registered by WordPress coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.) by Repository-hosted Themes. We would like to gather input and feedback on the following discussion points:

  1. 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/PluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party breakage due to an unexpected version (whether older or newer than the WordPress-bundled version).
  2. 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’ ).
  3. 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?