ClassicPress Plugin Development: Best Practice for Loading Styles and Scripts

ClassicPress PluginsThis post is part of the ClassicPress Plugin Development series in which I am going to look at both best practice for developing plugins and how I approach some requirements as well as some of the functions I commonly use.

Over the last few posts, I have covered how to register and enqueue scripts and styles. In the posts on loading the admin styles and scripts I mentioned a check to only load the styles and scripts when the loaded page was the settings page for the plugin.

This is the best practice approach for developing plugins for ClassicPress; only load a script or style when it is needed. This is best practice for both scripts and styles on the front-end as well as the back-end admin dashboard.

Click to show/hide the ClassicPress Plugin Development Series Index