Changeset 37322
- Timestamp:
- 04/28/2016 06:19:15 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/customize-preview-widgets.js
r37040 r37322 373 373 374 374 widgetContainerElement = $( 375 sidebarPartial.params.sidebarArgs.before_widget.replace( '%1$s', widgetId ).replace( '%2$s', 'widget' ) +375 sidebarPartial.params.sidebarArgs.before_widget.replace( /%1\$s/g, widgetId ).replace( /%2\$s/g, 'widget' ) + 376 376 sidebarPartial.params.sidebarArgs.after_widget 377 377 ); … … 512 512 $.each( self.registeredSidebars, function( i, sidebar ) { 513 513 var widgetTpl = [ 514 sidebar.before_widget .replace( '%1$s', '' ).replace( '%2$s', '' ),514 sidebar.before_widget, 515 515 sidebar.before_title, 516 516 sidebar.after_title, … … 525 525 widgetClasses = emptyWidget.prop( 'className' ); 526 526 527 // Remove class names that incorporate the string formatting placeholders %1$s and %2$s. 528 widgetClasses = widgetClasses.replace( /\S*%[12]\$s\S*/g, '' ); 529 widgetClasses = widgetClasses.replace( /^\s+|\s+$/g, '' ); 530 527 531 // Prevent a rare case when before_widget, before_title, after_title and after_widget is empty. 528 532 if ( ! widgetClasses ) { 529 533 return; 530 534 } 531 532 widgetClasses = widgetClasses.replace( /^\s+|\s+$/g, '' );533 535 534 536 if ( widgetClasses ) {
Note: See TracChangeset
for help on using the changeset viewer.