As you can see from the hook order, widget_init
is a hook that is quite early in the page execution order. So, by the time save_post
is fired widget_init
has already passed. If you add an action to a hook that has already passed, nothing will happen.