[development] the time of $op is over?

Darrel O'Pry darrel.opry at gmail.com
Thu May 15 18:58:00 UTC 2008

On Fri, 2008-05-09 at 11:23 +0200, Gábor Hojtsy wrote:
> Hello,
> Now that the registry patch landed, it looks like the time of $op
> might be over. General hooks implementing different branches with $op
> will always be loaded regardless of the exact need for them. Larry
> already suggests using the more granular *_preprocess_hookname() type
> of callbacks instead of the generic *_preprocess() callbacks for theme
> stuff, so that only those needed will be loaded. Take nodeapi for
> example. Code for loading nodes might often be needed, but not code
> for updating or deleting them, right? Those could easily be admin.inc
> stuff.
> So what do you think about $op? Should we evaluate on a case-by-case
> basis to make function level callbacks out of $op's or just do it
> wholesale (no, I am not volunteering for a patch) to get an overall
> consistent API.
> Gabor

totally +1 the concept... I tend to do this in hook_*API's anyway. I
just get to cut out the wrapper and shorten the execution path.


More information about the development mailing list