Hooks to trigger a callback when adding, removing, rearranging or updating a widget in the widget area
I ended up using the updated_option hook and checking if a widget or sidebar has been updated. When a widget is added, removed or saved, the update_option hook is fired. All widget option names start with “widget_“. By checking if the option name starts with “widget_” we can determine if a widget was added, removed … Read more