mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-21 22:15:28 +00:00
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. Built from https://develop.svn.wordpress.org/trunk@30308 git-svn-id: http://core.svn.wordpress.org/trunk@30307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d21799ee1f
commit
8b32164b67
@ -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;
|
||||
}
|
||||
} );
|
||||
|
2
wp-admin/js/customize-widgets.min.js
vendored
2
wp-admin/js/customize-widgets.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.1-alpha-30307';
|
||||
$wp_version = '4.1-alpha-30308';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user