- Timestamp:
- 12/13/2021 10:19:21 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-sidebars-controller.php
r52016 r52362 220 220 foreach ( $sidebars as $sidebar_id => $widgets ) { 221 221 foreach ( $widgets as $i => $widget_id ) { 222 // This automatically removes the passed widget ids from any other sidebars in use.222 // This automatically removes the passed widget IDs from any other sidebars in use. 223 223 if ( $sidebar_id !== $request['id'] && in_array( $widget_id, $request['widgets'], true ) ) { 224 224 unset( $sidebars[ $sidebar_id ][ $i ] ); 225 225 } 226 226 227 // This automatically removes omitted widget ids to the inactive sidebar.227 // This automatically removes omitted widget IDs to the inactive sidebar. 228 228 if ( $sidebar_id === $request['id'] && ! in_array( $widget_id, $request['widgets'], true ) ) { 229 229 $sidebars['wp_inactive_widgets'][] = $widget_id;
Note: See TracChangeset
for help on using the changeset viewer.