[wp-hackers] Include popular libs with a function
Sean Hickey
seanhickey at gmail.com
Sat Aug 19 17:33:36 GMT 2006
> A plugin can include and register libraries to be used by other
> plugins and/or themes as well. wp_register_script can be used to avoid
> double loading included libraries twice. If you'd like, you can create
> a bundle of all kinds of libraries for all this stuff in one plugin
> and register them all, however, good luck getting every little library
> and such that people want.
Certainly lines need to be drawn. I'm not saying include every single
lib found on the net. Just a handful of the most popular ones. The
ones that are already very stable, and already have a good community
built around them.
> Personally, I'd not bother trying to push a ton of different JS
> effects and helper libraries into the core All we really need is maybe
> one lightweight effects library to promote some sort of consistancy
Consistency is a keyword here. As I mentioned in a previous reply,
there is nothing stopping one plugin developer from using Prototype
1.4, and another developer from using 1.3. After looking over the
script loader API, it seems like both libs would be included in the
doc's head, even if both developers are using the same functions.
Including libs ensures that developers use what they have -- i.e. what
comes with WP -- instead of supplying their own libraries.
> (I'd vote for moofx here, its incredibly small, lightweight, and we
> already have Prototype which is an essential library in the core). I
> see no need to weight down the core with 50 libraries to cover all our
> bases
Right, I don't want 50 libraries either. Just a handful of the
popular ones. I would also vote for moo.fx.
- Sean
--
http://www.headzoo.com
More information about the wp-hackers
mailing list