I'm currently authoring the development of a plugin for wordpress, and I'm having trouble figuring out which would be the best way to add scripts to the plugin. I'm in the process of adding more scripts, and I already have JQuery (through WordPress), JQuery UI (through googleapis). Eventually I'll be adding SWFUpload, but before I continue, I wanted to understand what would be the appropriate approach to my situation.
From what I've gathered, and I'm not totally sure if I'm correct on it. There's 3 different ways to add/enqueue scripts.
- Use the script already built inside WordPress - which I'm wondering could cause some issues with some webmasters using older versions of wordpress.
- Download a stable version and add it to my plugin directory - which basically guarantees that the plugin will use the same version and will always be available.
- Use the ajax.googleapis.com URL linking the script to enqueue - no changes to the version, but can connectivity with the webmaster's server or the googleapi server be an issue?
The things I'm wondering about, is reliability, speed, and any standards to it, if any.