diff --git src/wp-admin/js/customize-widgets.js src/wp-admin/js/customize-widgets.js
index 1d7579f..0f42db3 100644
|
|
|
|
| 1380 | 1380 | |
| 1381 | 1381 | // Check if the widget is in another sidebar |
| 1382 | 1382 | api.each( function( otherSetting ) { |
| 1383 | | if ( otherSetting.id === self.setting.id || 0 !== otherSetting.id.indexOf( 'sidebars_widgets[' ) || otherSetting.id === 'sidebars_widgets[wp_inactiveWidgets]' ) { |
| | 1383 | if ( otherSetting.id === self.setting.id || 0 !== otherSetting.id.indexOf( 'sidebars_widgets[' ) || otherSetting.id === 'sidebars_widgets[wp_inactive_widgets]' ) { |
| 1384 | 1384 | return; |
| 1385 | 1385 | } |
| 1386 | 1386 | |
| … |
… |
|
| 1411 | 1411 | // Move widget to inactive widgets sidebar (move it to trash) if has been previously saved |
| 1412 | 1412 | // This prevents the inactive widgets sidebar from overflowing with throwaway widgets |
| 1413 | 1413 | if ( api.Widgets.savedWidgetIds[removedWidgetId] ) { |
| 1414 | | inactiveWidgets = api.value( 'sidebars_widgets[wp_inactiveWidgets]' )().slice(); |
| | 1414 | inactiveWidgets = api.value( 'sidebars_widgets[wp_inactive_widgets]' )().slice(); |
| 1415 | 1415 | inactiveWidgets.push( removedWidgetId ); |
| 1416 | | api.value( 'sidebars_widgets[wp_inactiveWidgets]' )( _( inactiveWidgets ).unique() ); |
| | 1416 | api.value( 'sidebars_widgets[wp_inactive_widgets]' )( _( inactiveWidgets ).unique() ); |
| 1417 | 1417 | } |
| 1418 | 1418 | |
| 1419 | 1419 | // Make old single widget available for adding again |