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:

add_theme_support( 'customize-selective-refresh-widgets' );

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.

There are 5 comments

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