- 🇳🇿New Zealand quietone
After 8 years of no more discussion, I agree with @yoroy.
As a module developer I would like a way to dynamically implement hooks. What I mean by that is that I could implement just one or two hooks which would return the hook names and handle implementations of whatever hooks my module was configured to react to.
The basic need for it is to simply to make my module aware of certain user-configured events, much like rules invokes a 'rule event'. In fact this would allow something like the rules module to attach to user nominated hook invocation events without any special code by a developer.
I've run into this problem a couple times where I wanted to create a lot of flexibility and have the site perform some task based on the firing of any of the wide variety of hooks invoked by contrib modules. I tried to fudge it with hook_hook_info but it's just not flexible enough.
Plus not to mention a lot of times I have a Rules module invocation it is coupled with a module_invoke or something anyway:
<?php
if (module_exists('rules')) {
rules_invoke_event('login_one_time_used', $user);
}
module_invoke_all('login_one_time_used', $user);
?>
Which leads me to wonder why rules can't just attach itself to some hook the site administrator wants, but it isn't possible/reasonable to do that at the moment.
To sweeten the deal, modules defining hooks could provide a display string to explain the hook, but that's another story.
Closed: won't fix
Idea
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
After 8 years of no more discussion, I agree with @yoroy.