Customizer: Trigger widget-added
event when initializing.
Widget controls are now added to the pane dynamically via JavaScript, see #28709. Remove the event trigger from `SidebarControl.addWidget()` as it's covered by `WidgetControl.ready()`. props westonruter. fixes #30236. git-svn-id: https://develop.svn.wordpress.org/trunk@30308 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3b3be684e8
commit
3566ac62c8
@ -434,6 +434,12 @@
|
||||
this._setupHighlightEffects();
|
||||
this._setupUpdateUI();
|
||||
this._setupRemoveUI();
|
||||
|
||||
/*
|
||||
* Trigger widget-added event so that plugins can attach any event
|
||||
* listeners and dynamic UI elements.
|
||||
*/
|
||||
$( document ).trigger( 'widget-added', [ this.container.find( '.widget:first' ) ] );
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1806,8 +1812,6 @@
|
||||
}
|
||||
} );
|
||||
|
||||
$( document ).trigger( 'widget-added', [ $widget ] );
|
||||
|
||||
return widgetFormControl;
|
||||
}
|
||||
} );
|
||||
|
Loading…
Reference in New Issue
Block a user