Make WordPress Core

Opened 2 years ago

Last modified 20 months ago

#36733 new enhancement

Use a custom customizer section for add-widgets and add-menu-items panels, making this UI pattern reusable in plugins

Reported by: celloexpressions Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 3.9
Component: Customize Keywords: needs-patch
Focuses: Cc:


I've been thinking for a long time about how to make the add widgets/add menu items slide-out panel UI reusable for plugins. What if we restructure them as a custom section, with child section classes (or full-section custom controls) for widgets and menus that handle the actual UI?

In the case of widget and menus we would hide top-level UI from the panel and display it in every section (as it already is, likely just changing the button to invoke the custom section's expand method). For the base custom section that could be the UI of the section. There are several potential benefits to restructuring the menus and widgets code in the context of a section and control, in addition to finally abstracting the sliding frame UI for third party usage.

Note that the menus code originated as a copy-paste from widgets, so they should be similar enough to be abstracted off of a common base section, but there are discrepancies that have evolved over time.

Change History (1)

This ticket was mentioned in Slack in #core-customize by celloexpressions. View the logs.

20 months ago

Note: See TracTickets for help on using tickets.