Skip to content

Commit 9074e4e

Browse files
committed
Widgets: Insert widgets into the selected sidebar correctly in accessibility mode.
Renames variables to resolve conflict with outer scope variables, fixing widget placement in selected sidebars. Props joedolson, sabernhardt, vybiral, wildworks. Fixes #64380. git-svn-id: https://develop.svn.wordpress.org/trunk@61399 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 600dbef commit 9074e4e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/wp-admin/widgets-form.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@
187187

188188
// Remove old position.
189189
if ( ! isset( $_POST['delete_widget'] ) ) {
190-
foreach ( $sidebars_widgets as $sidebar_id => $sidebar ) {
191-
if ( is_array( $sidebar ) ) {
192-
$sidebars_widgets[ $sidebar_id ] = array_diff( $sidebar, array( $widget_id ) );
190+
foreach ( $sidebars_widgets as $sidebar_widget_id => $sidebar_widget ) {
191+
if ( is_array( $sidebar_widget ) ) {
192+
$sidebars_widgets[ $sidebar_widget_id ] = array_diff( $sidebar_widget, array( $widget_id ) );
193193
}
194194
}
195195

0 commit comments

Comments
 (0)