Customizer: Fix missing newly added widgets in the preview after [29905].
props westonruter. fixes #29983. git-svn-id: https://develop.svn.wordpress.org/trunk@30104 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3f36fb3a30
commit
e999d15f44
@ -1681,7 +1681,7 @@
|
||||
widgetNumber = parsedWidgetId.number,
|
||||
widgetIdBase = parsedWidgetId.id_base,
|
||||
widget = api.Widgets.availableWidgets.findWhere( {id_base: widgetIdBase} ),
|
||||
settingId, isExistingWidget, widgetFormControl, sidebarWidgets, settingArgs;
|
||||
settingId, isExistingWidget, widgetFormControl, sidebarWidgets, settingArgs, setting;
|
||||
|
||||
if ( ! widget ) {
|
||||
return false;
|
||||
@ -1738,7 +1738,8 @@
|
||||
transport: 'refresh',
|
||||
previewer: this.setting.previewer
|
||||
};
|
||||
api.create( settingId, settingId, {}, settingArgs );
|
||||
setting = api.create( settingId, settingId, '', settingArgs );
|
||||
setting.set( {} ); // mark dirty, changing from '' to {}
|
||||
}
|
||||
|
||||
controlConstructor = api.controlConstructor[controlType];
|
||||
|
Loading…
Reference in New Issue
Block a user