[wp-hackers] Include popular libs with a function

Sean Hickey seanhickey at gmail.com
Fri Aug 18 04:31:04 GMT 2006


Howdy all,
  I've brought this up before on the list, on IRC, and on my blog
(Matt commented on the post), but I'll bring it up again.

  To me it seems like a good idea for WP to automatically include
popular JS libraries like Prototype and Scriptaculous.

  I see plugin after plugin using those scripts, and it seems wasteful
for each plugin to include the scripts, and insert them into the
document's head.

  On top of that I'd like to see a single function call to insert the
scripts into the documents head.  Something like:

add_head('prototype');
add_head('tw-sack');

etc.  The function would not only take care of adding the scripts to
the document's head, but would also make sure the scripts aren't being
included more than once.

  I wanted to get some thoughts on the idea before writing up a
working function, and submitting it to trac.

- Sean
-- 
http://www.headzoo.com


More information about the wp-hackers mailing list