[wp-hackers] Adding A CSS Loader

Robin Adrianse robin.adr at gmail.com
Mon Apr 23 15:41:09 GMT 2007


I believe we already do this with the script loader. wp_register_script() to
register a script, and wp_enqueue_script() to queue it up. But it may or may
not hook into wp_head. I'd have to look into that.

On 4/23/07, Jamie Holly <hovercrafter at earthlink.net> wrote:
>
> >
> > This seems like a good proposal.
> >
> > I would like to add the same idea for the addition of javascript.
> > Although I wonder about the order which might cause issues with
> > javascript files (such as with prototype and jquery). I'm not sure if
> > the same would apply to css.
> >
> > grtz
> > BjornW
> >
>
> This would also be a good idea. We could add a load order to the function
> -
> add_js('js file name',load_order), with the higher numbers loading before
> the lower numbers.
>
> I think this would all be best in a major version release (ie: 3.0), but
> overall it would reduce the calls to the server to load files. If you got
> 5
> plugins loading CSS and JS, that is an additional 10 calls to the server.
> Add that to other items, such as theme images, and a page quickly becomes
> inflated with requests.
>
> Jamie Holly
> http://www.intoxination.net
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list