Helper Function For Registering JavaScript and Stylesheets with WordPress

If you wish to register WordPress JavaScript and/or stylesheet dependencies, the API provides functions that make this easy – it’s straightforward both for JavaScript and for stylesheets.

Whenever you’re doing any kind of work in which you find yourself making frequent calls to these functions, it may help to include a helper function to make it a bit easier.

Here’s an example function that I’ve used in a few of my projects:

Continue reading “Helper Function For Registering JavaScript and Stylesheets with WordPress”