Best practice enqueuing a dynamic CSS or JavaScript in WordPress


TL;DR I’m using WordPress Ajax and Nonces, a plugin that demonstrates how to enqueue dynamic CSS and JavaScript in WordPress is available at GitHub.

I’m boldly claiming that this is best practice for dynamically loading a style or script in WordPress. Why?  The loaded code is protected by a nonce. Disagree? Please tell me why, I’m learning every day.

Continue reading