The hook_hook_info is poorly named.
As per http://api.drupal.org/api/function/hook_hook_info this is trigger related only and so should be renamed to hook_trigger_info.
This topic was discussed on IRC today and there where no votes against (yet).
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 344772-hook-trigger-info-D7.patch | 7.98 KB | dave reid |
| #10 | 344772-hook-trigger-info-D7.patch | 8.08 KB | dave reid |
| #9 | 344772-hook-trigger-info-D7.patch | 7.48 KB | dave reid |
| #4 | 344772-hook-trigger-info-D7.patch | 6.57 KB | dave reid |
| #2 | trigger_info.patch | 6.57 KB | miro_dietiker |
Comments
Comment #1
dave reidI have no objection to this. It makes more sense for it to be named hook_trigger_info().
Comment #2
miro_dietikerProviding patch for this rename against HEAD.
Comment #3
keith.smith commentedpossiblityis misspelled (it apparently was also a typo before this patch but it still needs to be fixed).Comment #4
dave reidI fixed the spelling error and I confirmed that all possible replacements have been made. Follow-ups will be to make sure we document the change in the 6.x to 7.x page and also commit the change to contrib/docs/examples/trigger_example.module.
Comment #5
dave reidComment #6
catchVery nice change.
Comment #7
miro_dietikerAfter all that positive confirmation i've consulted the file again..
There are other occurences of the word "hook" (e.g. variables $hook, $hooks) that are not critical for this api redefinition but could be renamed to $trigger, $triggers, ...
Should we do this in the same cycle? I'm not perfectly sure about all internal replacements.
Comment #8
catchHmm, I think it probably makes sense to change $hook to $trigger here, setting to needs review rather than CNW though in case that's out of scope.
Comment #9
dave reidMakes sense to change the $hook(s) variables to $trigger(s).
Comment #10
dave reidOne little $trigger that should have been $triggers... and a little cleanup.
Comment #12
dave reidRerolled for review.
Comment #14
casey commentedhttp://api.drupal.org/api/function/hook_trigger_info/7