Get Your Widgets Ready for WordPress 4.5

testing

WordPress 4.5 is right around the corner with the first release candidate now available for download. It includes 49 changes from the last beta – improvements to the new custom logo feature, a minor update to jQuery, updates to inline documentation, and fixes for various small bugs.

The upcoming release is packed full of improvements to the customizer: selective refresh, support for setting-less controls, and device preview. Plugin and theme authors who want to be on the cutting edge of the customizer’s new capabilities will want to review Weston Ruter’s post on Implementing Selective Refresh Support for Widgets. All of the default WordPress themes and core widgets will ship with selective refresh in 4.5, but the feature is opt-in for plugins and themes.

For most themes with standard sidebars, adding selective refresh is as simple as including one line to declare theme support:

[php light=”true”]add_theme_support( ‘customize-selective-refresh-widgets’ );[/php]

Adding support for widgets is a bit more involved, depending on whether the widget uses JavaScript for initialization. Ruter’s post includes a tutorial for how to add selective refresh in either scenario. The target release date for 4.5 is April 12, 2016, so plugin and theme developers still have three weeks to add support.

5

5 responses to “Get Your Widgets Ready for WordPress 4.5”

  1. I just updated my Advanced Comments Widget to take advantage of the new Selective Refresh functionality rolling out in the upcoming version. It was really strait-forward; just one line of code added to the widget options. I hope all plugin devs take advantage of this update. It makes the Customizer preview a much better experience.

Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.