6 May
2006
6 May
'06
10:12 p.m.
On May 6, 2006, at 3:38 PM, Khalid B wrote:
One thing that bothered me for a while is that we almost moved from hook_foo() to foo_nodeapi(), but never completely did so.
In some cases we use foo_view(), in others we have a foo_nodeapi() with a switch/case for $op 'view'.
They mean different things. Use foo_view() if foo.module defines a node type, and wants to define its presentation. Use foo_nodeapi('view') if foo.module doesn't define a node type, but wants to alter the presentation of all nodes. I don't have a big problem with making the API consistent for these, but we need to realize that they are not interchangeable as it stands.