Download & Extend

Rename hook_hook_info() to hook_trigger_info()

Project:Drupal core
Version:7.x-dev
Component:trigger.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

#1

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

#2

Status:active» needs review

Providing patch for this rename against HEAD.

AttachmentSizeStatusTest resultOperations
trigger_info.patch6.57 KBIdleFailed: Failed to install HEAD.View details

#3

Status:needs review» needs work

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

#4

Status:needs work» needs review

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.

AttachmentSizeStatusTest resultOperations
344772-hook-trigger-info-D7.patch6.57 KBIdleFailed: Failed to install HEAD.View details

#5

Title:rename hook_hook_info to hook_trigger_info» Rename hook_hook_info() to hook_trigger_info()

#6

Status:needs review» reviewed & tested by the community

Very nice change.

#7

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.

#8

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.

#9

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

AttachmentSizeStatusTest resultOperations
344772-hook-trigger-info-D7.patch7.48 KBIdleFailed: 7553 passes, 66 fails, 618 exceptionsView details

#10

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

AttachmentSizeStatusTest resultOperations
344772-hook-trigger-info-D7.patch8.08 KBIdleFailed: Failed to apply patch.View details

#11

Status:needs review» needs work

The last submitted patch failed testing.

#12

Status:needs work» needs review

Rerolled for review.

AttachmentSizeStatusTest resultOperations
344772-hook-trigger-info-D7.patch7.98 KBIdleFailed: Failed to apply patch.View details

#13

Status:needs review» needs work

The last submitted patch failed testing.

#14

#15

Status:fixed» closed (fixed)

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

nobody click here