0

I haven't found a document, except this one, that says which jQuery packages are included by wordpress. Thus, I don't know if I should add jQuery to my header.php or not.

The link above, doesn't state the version of the libraries included nor the wordpress version that this applies to.

Should I load jQuery UI manually?

3

On the front end (i.e. in a Theme) don't enqueue jQuery or jQuery UI unless you actually need to use either of them. On the back end (i.e. in the Admin area), both will already be enqueued, since core uses them.

Whatever the case, if you use a core-bundled script, you should always use the version bundled with core, since core, Themes, and Plugins will all expect the core-bundled version to be registered.

That said, as of WordPress 3.2.1, not all jQuery UI plugins are included in core, so if you need to use a plugin that is not in the list on the wp_enqueue_script() page, you'll need to bundle and register that plugin yourself.

As of WordPress 3.3, all jQuery UI plugins will be bundled/registered in core, and will thus be available to be enqueued.

2

WordPress comes pre-loaded with jQuery, jQuery UI, Scriptaculous and a lot of other helpful JavaScript libraries. You can see all of them in the wp-includes/js folder of your WP installation. All you have to do is wp_enqueue_script them to use in your themes / plugins.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.