We talk a lot about the idea of having bootstrap files in WordPress plugins, which I think are great, but we seem to limit it to those files that are responsible just for starting our WordPress plugins. This isn’t exactly what I meant, but I dig the picture. I mean, hooking into plugins_loaded and then instantiating some classes, setting up a service registry, or things like that are important. But what about other components that make up our plugins? And by that, I mean what about our JavaScript files? Should they have their way to be bootstrapped? Bootstrapping JavaScript Files When it comes to working with WordPress, you’re more than likely going to be working with jQuery. It’s a tried and true library, It ships with core, The UI library is available so that you can take advantage of other elements, as well. And sure, this isn’t to discount the use of other libraries like Backbone, but when it comes to working with DOM manipulation on both the client-side and the server-side you’re less likely to use Backbone (and more likely to use jQuery). Furthermore, there are already JavaScript standards for WordPress and I think, just as we should be using the
Share This

We are using cookies on our website

Please confirm, if you accept our tracking cookies. You can also decline the tracking, so you can continue to visit our website without any data sent to third party services.