Make WordPress Core

Changeset 30104


Ignore:
Timestamp:
10/29/2014 10:56:53 PM (10 years ago)
Author:
ocean90
Message:

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

props westonruter.
fixes #29983.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/customize-widgets.js

    r30102 r30104  
    16821682                widgetIdBase = parsedWidgetId.id_base,
    16831683                widget = api.Widgets.availableWidgets.findWhere( {id_base: widgetIdBase} ),
    1684                 settingId, isExistingWidget, widgetFormControl, sidebarWidgets, settingArgs;
     1684                settingId, isExistingWidget, widgetFormControl, sidebarWidgets, settingArgs, setting;
    16851685
    16861686            if ( ! widget ) {
     
    17391739                    previewer: this.setting.previewer
    17401740                };
    1741                 api.create( settingId, settingId, {}, settingArgs );
     1741                setting = api.create( settingId, settingId, '', settingArgs );
     1742                setting.set( {} ); // mark dirty, changing from '' to {}
    17421743            }
    17431744
Note: See TracChangeset for help on using the changeset viewer.