Customize: Prevent widget previewing logic from building invalid jQuery selectors when sidebars are registered without a class name in `before_widget`.
Fixes #37993. Built from https://develop.svn.wordpress.org/trunk@38577 git-svn-id: http://core.svn.wordpress.org/trunk@38520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3afaf2147c
commit
c1a0ed8540
|
@ -537,7 +537,9 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
// Remove class names that incorporate the string formatting placeholders %1$s and %2$s.
|
||||
widgetClasses = widgetClasses.replace( /\S*%[12]\$s\S*/g, '' );
|
||||
widgetClasses = widgetClasses.replace( /^\s+|\s+$/g, '' );
|
||||
widgetSelector += '.' + widgetClasses.split( /\s+/ ).join( '.' );
|
||||
if ( widgetClasses ) {
|
||||
widgetSelector += '.' + widgetClasses.split( /\s+/ ).join( '.' );
|
||||
}
|
||||
self.widgetSelectors.push( widgetSelector );
|
||||
});
|
||||
};
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-alpha-38576';
|
||||
$wp_version = '4.7-alpha-38577';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue