[wp-hackers] Adding A CSS Loader
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.
> > Although I wonder about the order which might cause issues with
> > 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
> 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
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers