[wp-hackers] Accessing jQuery in Core for a plugin
ade at studiograsshopper.ch
Tue Nov 11 12:55:13 GMT 2008
Thank for the tip!
Some more questions, if I may:
1. If I want to load two js files that need jQuery, do I simply call wp_enqueue_script twice?
2. In terms of action hooks, should I be using wp_print_scripts? It seems to me that using 'init' or 'template_redirect' loads the scripts before the HEAD html tag. (testing on 2.7 beta2) and (as I've read elsewhere) wp_head is too late.
Again, thanks in advance.
> Jason Webster wrote on
> Tue Nov 11 05:50:06 GMT 2008
> It is worthwhile to note that only WP
> 2.6 includes jQuery 1.2.6+. For
> example, 2.5 shipped with 1.2.3, so if backwards compatibility is a
> priority of yours, make sure not to utilize any > 1.2.3 specific
> features. The only big change to note was that the dimensions plugin
> (which was included with WP < 2.6, so you'd have to enqueue it > separately) was integrated with the jQuery core.
More information about the wp-hackers