1
vote
1answer
32 views

How resource intensive is wp_register_script()?

I'm trying to use the has_shortcode() function to only load certain scripts when there is a shortcode in the post's content, with this code: wp_register_script( 'shortcode-js-file' , FILE_URI, array( ...
12
votes
4answers
1k views

Could the WP script/style loader be used to concatenate and gzip scripts and styles in the front-end?

WP has a nice javascript loader included in wp-admin: http://core.trac.wordpress.org/browser/tags/3.0.4/wp-admin/load-scripts.php and a CSS loader: ...
6
votes
4answers
5k views

How to use Head JS with all enqueued scripts?

I want to load head js first and then all enqueued scripts into it's function. Like so... <script src=">/js/head.load.min.js" type="text/javascript" charset="UTF-8"></script> ...