kb at 2bits.com
Thu Jan 4 01:01:18 UTC 2007
On 1/3/07, Karoly Negyesi <karoly at negyesi.net> wrote:
> (Can't remember at 1am whether 4.7 had this already but 5.0 has it for
Not going to let you go easy. This is about lunchtime for you ;-)
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
Thanks for the explanation.
The point remains though that from a module developer point of view, they
look the same.
What Drupal does with them may be different, but as far as my module is
are points of call from Drupal to the module, and they overlap often.
For the rename you are proposing, would something like this work?
- move all hook_load() and friends into hook_othernodeapi($op), where $op is
- So, we have one real hook (hook_nodeapi($op)), and one callback
(of course, othernodeapi has to be something better)
This has the advantage of having only a maximum of two functions per module,
with ops of course.
One for node creation modules, and the other the regular nodeapi we know
How about that?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the development