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

What should we write about next?

If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.

Your Name

Your Email

Suggested Topic

Suggestion Details

Leave a Reply

Your email address will not be published. Required fields are marked *