Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

To improve my website's loading speed a bit (and to impress the judges--sad reality of the kind of website I'm building, there are judges), I want to implement yepnope.js to load the Javascript dynamically. However, I'm running into a roadblock with the Wordpress jQuery plugins, because Wordpress still embeds them as a script tag.

Is there a way to modify Wordpress's script-loading mechanism so that I can just get an array of plugins to feed into Yepnope, or some other solution?

share|improve this question

2 Answers 2

I suppose you could use wp dequeue script and then use yepnode, but honestly I don't see the point with regards to speed since wp_enqueue_script already allows for conditional loading with dependencies.

This is assuming your using well written theme/plugins that allow for the use of the built in function hooks. You can get an array of plugins but you cannot guess how plugin/theme authors are loading scripts.

share|improve this answer

Using yepnope is going to cause too much trouble. Just use what WordPress already provides. Add some conditional scripting references with the is_admin() and plugin specific pages.

I would use wp_dequeue_script() and wp_enqueue_script() appropriately combined with some WP minify, since yepnope is a way to speed up the site to begin with.

References

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.