• Resolved Gooly

    (@gooly)


    Just a general question regarding remove_action.
    If I hook up a function, I use add_action, and I can add a priority to it. Very useful and very clear. No problem.
    But my question is; if I un-hook a function with remove_action, I can optionally give a priority too, and as far as I understood, it should be the same priority as given when the action was hooked.

    But why would I want to give a priority when removing it? I just want it to be removed, I don’t care about it’s initial priority. (Do I?)
    In other words; what is the reason of giving a (initial) priority when removing an action?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theoretically you could add a function to a hook twice at two different priorities, and might only want to remove one?

    Thread Starter Gooly

    (@gooly)

    That makes sense JakePT. Thanks!
    (I asked this question on some more places and this is the only answer not saying: “I don’t know, I just do it” ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Priority on remove_action’ is closed to new replies.