Load Javascript With Your WordPress Plugin: Sage advice from a seasoned and proven plugin developer for WordPress. Ozh talks about some neat javacript loading options and dos and don’t s for plugin developers who need to load various javascript libraries. If you use javascript in your plugin and are not aware of wp_enqueue_script, you need to head over to Ozh’s post.
Well said ! 🙂
Wow, that is a great explanation of wp_enqueue_script. Well done.
I can confirm that wp_enqueue_script also can be called from themes. I am using it to call jQuery library. In fact you can even enqueue your own JavaScript library to it will be added to the header.
Now when can we expect to get the wp_enqueue_css api?
Azizur,
Seriously, that would be neat. Something I’d love to see.
The best place, in my opinion, is to use wp_enqueue_script in the “functions.php” to load JavaScript files for themes.