Customizer: Fix missing newly added widgets in the preview after [29905].

props westonruter.
fixes #29983.
Built from https://develop.svn.wordpress.org/trunk@30104


git-svn-id: http://core.svn.wordpress.org/trunk@30104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2014-10-29 22:57:23 +00:00
parent 27b88c350a
commit 00845a6c3d
3 changed files with 5 additions and 4 deletions

View File

@ -1681,7 +1681,7 @@
widgetNumber = parsedWidgetId.number, widgetNumber = parsedWidgetId.number,
widgetIdBase = parsedWidgetId.id_base, widgetIdBase = parsedWidgetId.id_base,
widget = api.Widgets.availableWidgets.findWhere( {id_base: widgetIdBase} ), widget = api.Widgets.availableWidgets.findWhere( {id_base: widgetIdBase} ),
settingId, isExistingWidget, widgetFormControl, sidebarWidgets, settingArgs; settingId, isExistingWidget, widgetFormControl, sidebarWidgets, settingArgs, setting;
if ( ! widget ) { if ( ! widget ) {
return false; return false;
@ -1738,7 +1738,8 @@
transport: 'refresh', transport: 'refresh',
previewer: this.setting.previewer 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]; controlConstructor = api.controlConstructor[controlType];

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.1-alpha-30103'; $wp_version = '4.1-alpha-30104';
/** /**
* 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.