The Most Exciting Feature of WordPress 4.5 Beta 1

The news just broke that WordPress 4.5 Beta 1 was just released. It seems to me that this released doesn’t provide too many sexy new features. There are a number of new Customizer integrations, such as Theme Logo Support and a Responsive Preview feature. But the new feature that excites me is the addition of the wp_add_inline_script() method, which complements the already existing wp_add_inline_style() function. The new function provides a standard way to include inline JavaScript.

Why does this matter? Adding inline styles through this method can guarantee that dependencies have been loaded before the code executes. That alone is important. But I’m excited by the potential this function brings to the table. As themes and plugins adopt it, caching solutions should be able to lock into it and move the inline scripts to external files that can be cached and even offloaded to a CDN rather than re-downloaded for every page view. I’m sure we’ll see solutions like Super Cache and Fastest Cache integrating quickly.