Widget Customizer Proposed For WordPress 3.9

The Widget Customizer plugin is currently being considered for inclusion in WordPress 3.9. Weston Ruter, the project’s lead developer, submitted a proposal for its merge into core. He and a large team of contributors have been working ardently to bring this feature into WordPress so that users no longer have to edit widgets blind. With the Widget Customizer in place, you can see a live preview of your widget as you are editing it.

widget-editing

The Widget Customizer actually goes far beyond simply editing widgets. Actions available in the live preview include: adding a new widget, editing existing widgets, reordering widgets, dragging widgets to other sidebars, or even removing widgets from the sidebars entirely. There’s no need to save and move to the frontend to preview any of these actions, since they can all make use of the customizer’s preview.

widget-actions

As you can see in the screenshot above, the plugin includes a couple of other new additions. The team added a search bar for finding a specific widget and icons to help you quickly identify a widget. Support for widget visibility is also included with a semi-transparent indicator in the customizer for widgets that are not able to be rendered in the preview.

New Requirements for WordPress Themes

If the Widget Customizer is added to core, WordPress theme developers will need to indicate that their widget areas support live previews in the customizer. This is as simple as adding support to the parent or child theme’s functions.php file:

add_theme_support(‘widget-customizer’)

Additionally, themes will need to indicate a widget’s support for live previews by including ‘customizer_support’ => true in the array passed to WP_Widget::__construct(). If the Widget Customizer is merged, WordPress theme developers will need to get busy making these updates for 3.9 in order to ensure a smooth experience for widget previews.

WordPress core developers will be studying the implementation of the Widget Customizer plugin today during the regularly scheduled development meeting. They will determine whether it is ready for core and provide feedback for improvement.

Have you tried the Widget Customizer plugin? Would you like to see it added in the next major release?

17 Comments


  1. Yes for sure, offers more flexibility !!! Bring it on.

    Report


  2. Thanks for the post, Sarah!

    If the Widget Customizer is added to core, WordPress theme developers will need to indicate that their widget areas support live previews in the customizer.

    Just to clarify this: themes and widgets are not required to indicate support for Widget Customizer: all existing themes and widgets should be compatible. However, for such themes and widgets which do not indicate support for Widget Customizer, any changes made to widgets will trigger the preview window to refresh, as opposed to a more responsive “live” preview. But this is the same requirement imposed on all themes that leverage the customizer: they have to explicitly indicate support for live previews of settings changes (e.g. transport=postMessage) because every theme is different in how it uses the settings. In the same way, all widgets are different and so we cannot assume they can be updated in place without a page refresh unless they explicitly indicate they support doing so.

    Report


  3. And next major feature should be native layout composer ;-) with good api… Something like visual composer plugin ;-)

    Report


  4. Putting nice things in core should be done slow & careful … and in most cases, preferably not at all.

    But to do something nice in core, that will – oh by the way – break every theme out there, sounds like a good idea only if it makes sense to push a large portion of the existing theme-inventory out of Extend.

    Is that a goal looking for a solution? Weed a large raft of under-maintained themes out of Extend?

    If so, doing it with a core-mod is a misuse of core; and a lackadaisical way to address issues in Extend.

    Report


    1. Widget Customizer is not going to break every theme out there. Themes don’t have to add support for it if the author doesn’t want to.

      Report


      1. I would love to see this happen and would definitely adopt it for my theme collection. For a user, setting up a new theme can be quite the runaround. Even if it’s a simple theme, there are so many menus to jump through just to get going. It would be great if users could setup their theme from within the Customizer without having to leave to go to the Widgets page. Change a few settings, add a few widgets and get back to adding content. That’s how simple it should be.

        The last update to the Widgets page was a nice iteration, solving some of the common annoyances with widgets. However, the Widgets page is still cumbersome to use, in my opinion. Maybe this could alleviate some of the remaining UX hurdles.

        Report


  5. Additionally, themes will need to indicate a widget’s support for live previews by including ‘customizer_support’ => true in the array passed to WP_Widget::__construct(). If the Widget Customizer is merged, WordPress theme developers will need to get busy making these updates for 3.9 in order to ensure a smooth experience for widget previews.

    I misread that paragraph to mean, ‘Oops – it appears your theme has not been updated to support the required Widget Customizer preview’.

    That makes it a lot less startling. ;)

    Report


    1. Right, the only thing that themes and widgets are required to indicate support for is *live previews*. If they don’t indicate this support, then they still can have Widget Customizer, but they’ll just lack live previews and will default to previews that refresh the entire customizer preview window.

      Report


    2. Yes, that’s about live refresh. All widgets will still work in customizer mode, it will just refresh the page when you update the settings instead of a faster refresh powered by some javascript, unless the widget explicitly support live refresh.

      Report


  6. What WordPress needs at its core is something like Black Studio TinyMCE Widget for widgets – full wordpress editor support INSIDE the text widget.

    Report



  7. Was testing WP 3.9 Beta1 and tried to activate widget customizer by add_theme_support(‘widget_customizer’); but that didn’t work. Do we need to make any other changes?

    Report


  8. The live widget preview is my favorite feature of new wordpress version. because I’ve created a plugin for add widgets to menu items and now I can to change settings of the menu widgets by theme customizer. This is awesome,

    Report

Comments are closed.