Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#43063 closed enhancement (wontfix)

wp customizer is missing core events

Reported by: tpaksu's profile tpaksu Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9.1
Component: Customize Keywords:
Focuses: javascript Cc:



Won't it be nice if we could use events like "menu-item-added", "widget-added" or like "widget-updated" events in the customizer too? I'm currently using "pane-contents-reflowed" or "state.change" events to handle such things.

Change History (1)

#1 @westonruter
6 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

You can listen for controls being added via wp.customize.control.bind( 'add', function( control ) { /* ... */ } )

So just check if begins with widget_ or nav_menu_item and that will tell you when a menu item or widget is added.

Note: See TracTickets for help on using tickets.