Include Builtin scripts from WordPress using wp_enqueue_script()

Since we already showed you how to Include Javascript and CSS files through your WordPress Plugin, this post will be about how to include builtin scripts from WordPress. Why would we use these pre-registered scripts?

Two Reasons Why to use Builtin scripts from WordPress

There are two main reasons why using the pre-registered scripts is beneficial. First, this method will help to prevent jQuery conflicts. Second, it is a lot easier to use dependencies. Here is a list of all default scripts included and registered by WordPress. First lets look at an example to help prevent jQuery conflicts: if your plugin uses jQuery 1.9.2 and WordPress uses jQuery 1.11 then some features, like the drag and drop, might not work. So instead of doing this: Continue reading “Include Builtin scripts from WordPress using wp_enqueue_script()”