wp_register_script and wp_enqueue_script
-
Hi,
I’ve a pluigin that needs to load jquery.js plus my own javascript.
At the moment this is done via a function that prints the <script…> tags using the add_action(‘wp_head’, ‘my_head_function’).
I’d like to move to the wp_register_script and wp_enqueue_script functions of wordpress in order to deal with themes or other plugins loading the same library, but I do not manage to get it work.
Can you please point at some working example where a plugin correctly load a js distributed with wordpress and plugin-specific js using such functions?
Thanks, Sergio
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘wp_register_script and wp_enqueue_script’ is closed to new replies.