Permalink
Browse files

Customizer: Account for a sidebar with no container to which classes …

…can be added.

props ocean90.
fixes #27780.

Built from https://develop.svn.wordpress.org/trunk@28100


git-svn-id: http://core.svn.wordpress.org/trunk@27931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
nacin committed Apr 13, 2014
1 parent ad850a3 commit 33515194a051af4534bbf8edeebccc4cfad0f001
Showing with 9 additions and 2 deletions.
  1. +8 −1 wp-includes/js/customize-preview-widgets.js
  2. +1 −1 wp-includes/js/customize-preview-widgets.min.js
@@ -50,7 +50,14 @@
emptyWidget = $(widgetTpl);
widgetSelector = emptyWidget.prop('tagName');
widgetClasses = emptyWidget.prop('className').replace(/^\s+|\s+$/g, '');
widgetClasses = emptyWidget.prop('className');
// Prevent a rare case when before_widget, before_title, after_title and after_widget is empty.
if ( ! widgetClasses ) {
return;
}
widgetClasses = widgetClasses.replace(/^\s+|\s+$/g, '');
if ( widgetClasses ) {
widgetSelector += '.' + widgetClasses.split(/\s+/).join('.');

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 3351519

Please sign in to comment.