wp-includes/widgets.php:1954Finds the sidebar that a given widget belongs to.
$widget_idstringstring|nullfunction wp_find_widgets_sidebar( $widget_id ) { foreach ( wp_get_sidebars_widgets() as $sidebar_id => $widget_ids ) { foreach ( $widget_ids as $maybe_widget_id ) { if ( $maybe_widget_id === $widget_id ) { return (string) $sidebar_id; } } } return null;}Introduced in 5.8.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/widgets.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.