[development] hook_nodeapi()

Karoly Negyesi karoly at negyesi.net
Thu Jan 4 00:05:40 UTC 2007


Confusion arises from the fact that we misnamed hook_load etc. as they are not hooks. For these we find the one function we need to call and call it, case closed. They are even less of a hook since you can define what 'hook' will replaced with. In the past, it was the module name, unconditionally, thus it really showed some semblance to a hook but now can define it with a (real) hook. (Can't remember at 1am whether 4.7 had this already but 5.0 has it for sure)

Compare its behaviour with hook_menu , hook_form_alter etc. Here, we iterate the modules that implement the hook. An arbitrary number of modules will be called. 'hook' is replaced with the implementing module name.

I would kindly suggest steering the discussion towards better naming of hook_load & co. 'Callbacks with a predefined prefix' somewhat does not sound spiffy.

Regards

NK


More information about the development mailing list