I have several custom widgets that are installed as part of my theme. I’d like to execute conditional code inside each widget’s admin panel (not the public side, I’m just interested in the admin panel inside function form($intance)), depending on which sidebar the widget is inserted into.
How can I obtain a reference to the current sidebar id which holds the widget, from within the widget’s function form($instance) handler?