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._setupHighlightEffects();
|
||||||
this._setupUpdateUI();
|
this._setupUpdateUI();
|
||||||
this._setupRemoveUI();
|
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;
|
return widgetFormControl;
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue