Skip to content

Conversation

westonruter
Copy link
Contributor

When adding a new widget to a sidebar, the widget ID was getting stripped from the sidebars_widgets option when calling \WP_Customize_Widgets::sanitize_sidebar_widgets_js_instance() because the new widget ID was not among the $wp_registered_widgets.

In Core, widgets should get registered if they get saved. The reason they were not registered is because it is customize_save request, and so preview does not apply.

westonruter added a commit that referenced this pull request Dec 17, 2015
…d-sidebar-js-value

Ensure that newly-added widgets don't get stripped from sidebar upon save
@westonruter westonruter merged commit 3e7de08 into master Dec 17, 2015
@westonruter westonruter deleted the bugfix/include-new-widgets-in-sanitized-sidebar-js-value branch December 17, 2015 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant