Create Topic

WP Tavern Forums Create Topic

Create New Topic

Weston Ruter

It has been extremely rewarding to work on contributing the Widget Customizer to WordPress Core and to collaborate with the widgets team to mature the plugin for merging. I’m still shocked at how quickly the Widget Customizer materialized: the core pieces came together in just a couple days of late night hackathons. It started out as a feature for one of our partner’s sites at X-Team, but turned into something which really belongs in Core.

For the past few months, I’ve been enamored with the Customizer and have wanted to move as much site management as possible into it. I’ve been convinced that if something cannot be previewed, it is not suitable for high-profile (enterprise) sites. I really have enjoyed building on Paul Clark’s Styles plugin, and adding new Customizer controls to do things like managing galleries by opening the Media Manager lightbox while in the Customizer.

In addition to the Customizer, I’ve been increasingly focusing on using widgets as building blocks for as much as possible. Widgets are great little units of MVC, encapsulating the model, presentation, and logic for modules of site functionality. But I wanted to be able to edit widgets in the Customizer.

I realized that since widget instances are just stored in WordPress options, you can register a Customizer setting for each widget instance, and the widget form control can be rendered inside of a Customizer control. After a bit of wiring, submitting the widget control then updates the Customizer setting which then causes the preview window to show the changes, all without saving anything to the database, until you hit Save & Publish.

For Widget Customizer, the key pieces were already there in Core: they just had to be connected together.

Development of the plugin is done on GitHub. See the issues reported there for what is being worked on. Pull requests are welcome!






Newsletter

Subscribe Via Email

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