Check if hook exists

Do you know of a good way to check whether or not a hook is in effect?
In one of my scripts, I have a toggle command for some inter-related hooks, so it needs to use hidden options to keep track of which hooks exist. So, I was wondering if there is a more direct way to keep track of that.

Like this:

1 Like

There is no hook state to access, but show the script it’s simpler.