in_widget_form detect sidebar id
The relation between sidebars and widgets is stored in the sidebars_widgets option, as a serialized array that might look like this (expanded): Array ( [orphaned_widgets_1] => Array ( [0] => recent-posts-2 ) [wp_inactive_widgets] => Array ( [0] => calendar-2 ) [sidebar-1] => Array ( [0] => recent-posts-5 [1] => text-6 [2] => text-2 [3] => … Read more