ThematoSoup/THA-Hooks-Interface

Add ability to do multiple hooks per hook group?

Opened this issue · 0 comments

I would like to see the ability to add multiple hooks per group, and assign a priority to each, since the underlying add_action() function supports a priority parameter.

For example, if my theme doesn't support THA hooks but I want to emulate before_footer and after_footer, I'd like to be able to create two different hooks on wp_footer, one with the highest priority and one with the lowest, to do something like output buffering to capture that section's output and process it in whatever way I'm wanting to – say, to dynamically remove a theme's author attribution line without having to modify the theme files (since that wouldn't survive an update).

In terms of how this might look in the admin interface, maybe a bit of jQuery or something - when you click a link underneath the first hook's input box, it adds a new set of fields for another hook right under the previous one?

Anyway, just to reiterate, this would be pointless unless you were to add a field for each hook's priority value.

I thought about trying to implement this myself and submit a PR, but I'm not experienced enough with plugin development or jQuery. So does this sound doable?