0

When I'm writing a plugin, do I assume that jquery is included, or should I always wp_enqueue_script it and let wordpress figure it out?

Also, what's the best practice for getting an image path figured out in my bundled css file?

1 Answer 1

1

One point for using wp_enqueue_script is for that very reason. Never assume anything, enqueue jQuery so that if it is there already it does nothing, but if not , it will queue it up.

If your talking about the image path for your plugin, you can use the following, http://codex.wordpress.org/Determining_Plugin_and_Content_Directories

The examples for plugins_url should help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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