[development] RFC: info hook standardization

Darrel O'Pry darrel.opry at gmail.com
Mon May 19 17:41:07 UTC 2008

On Mon, May 19, 2008 at 12:46 PM, John Wilkins <drupal.user at albin.net>

> HOOK_theme() fits the criteria you outlined, except for one item: "It takes
> no parameters."

Many other hooks also have no args, module_invoke_all has been able to
support 0-n args for a long time. This is a problem long since solve in php
and in various parts of drupal already. func_get_args,
call_user_func_array(), etc...

> HOOK_theme() actually has 4 parameters that are essential for theme
> developers. Of course, HOOK_theme() is a special case since themes (and not
> just modules) can call that hook. (And, btw, themes can't call the
> corresponding HOOK_theme_registry_alter().)

Themes can all call any hook. This is not a special case.  Really you're
going to have to explain, "themes can't call the corresponding
HOOK_theme_registry_alter()". Why not?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20080519/c866c208/attachment.htm 

More information about the development mailing list