Updating options within the WordPress admin is simple, right? It’s a matter of filling out a text field, checking a box, or swapping a radio button then clicking save.
But let’s say that you need to set up a hook that fires that also updates a secondary, related option whenever one is toggled.

For example, given an option represented by a checkbox, let’s say that you want to set an option in the database whenever the checkbox is unchecked and then delete it whenever said option is set.
There’s an action specifically for doing this that makes it pretty easy.



