NGG is very popular and therefore used with a wide variety of third party plugins and themes. Some plugins and themes decide to use their own version of jQuery. That isn’t necessarily a problem if the author decides to do that correctly by enqueuing the same version of jQuery but would like to load jQuery from a CDN. But it does become a problem when a third-party plugin/theme overrides to enqueue a different version of jQuery that changes the API interface such as what happened with jQuery 1.9 over 1.8. When that happens, things break. If you look at the definition of wp_deregister_script(), you can see that WP had to do it’s best to stop users from specifying their own jQuery versions in WP-Admin. Although they allow it on the front-end, they discourage it.
It would be very difficult for us, if not practically impossible, to determine if a particular plugin or theme is overriding the bundled version of jQuery for good reason. In any case though, if a plugin/theme needs a custom jQuery version they should enqueue it as a different handle, such as ‘jquery-custom’, rather than override the ‘jquery’ handle WP provides.
—
The fix_query() method in NGG resets the ‘jquery’ handle back to what WordPress shipped with. That is, the ‘jquery’ handle should have no ‘src’ attribute but instead have ‘jquery-core’ as a dependency. The ‘jquery-core’ handle should have a src of ‘/wp-includes/js/jquery/jquery.js’.
Resetting the handle back to how WP intended seems to resolve most of the cases we find, though there will be cases where it doesn’t work. It’s a very difficult problem to resolve in a general way due to the wide matrix of possible plugins/themes that NGG could be installed alongside. If there’s a better way of handling this, we’re open to suggestions.
For the cases in which resetting the ‘jquery’ handle back to what WP shipped with doesn’t work, our support staff will do their best to help determine what the problem might be and relay any details back to the developers for a solution. Your assistance and co-operation is much appreciated. Our goal is to be widely-compatible as possible.
Thanks,
Mike