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).

Comments

dave reid’s picture

I have no objection to this. It makes more sense for it to be named hook_trigger_info().

miro_dietiker’s picture

Status: Active » Needs review
StatusFileSize
new6.57 KB

Providing patch for this rename against HEAD.

keith.smith’s picture

Status: Needs review » Needs work

possiblity is misspelled (it apparently was also a typo before this patch but it still needs to be fixed).

dave reid’s picture

Status: Needs work » Needs review
StatusFileSize
new6.57 KB

I 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.

dave reid’s picture

Title: rename hook_hook_info to hook_trigger_info » Rename hook_hook_info() to hook_trigger_info()
catch’s picture

Status: Needs review » Reviewed & tested by the community

Very nice change.

miro_dietiker’s picture

After 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.

catch’s picture

Status: Reviewed & tested by the community » Needs review

Hmm, 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.

dave reid’s picture

StatusFileSize
new7.48 KB

Makes sense to change the $hook(s) variables to $trigger(s).

dave reid’s picture

StatusFileSize
new8.08 KB

One little $trigger that should have been $triggers... and a little cleanup.

Status: Needs review » Needs work

The last submitted patch failed testing.

dave reid’s picture

Status: Needs work » Needs review
StatusFileSize
new7.98 KB

Rerolled for review.

Status: Needs review » Needs work

The last submitted patch failed testing.

casey’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.