API page: http://api.drupal.org/api/drupal/includes--theme.inc/function/theme/6

In the list of the preprocess functions that theme() looks for, the parameter list for such functions is always reported to be &$variables, even for template_preprocess(&$variables), which instead gets an additional parameter.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Title: Documentation problem with theme() » theme() doc - list of functions called is incorrect

Thanks! This does indeed look like a problem. D6 only (it was fixed in d7).

mr.baileys’s picture

Title: theme() doc - list of functions called is incorrect » Theme preprocess functions without hook-suffix take $hook as second argument.
Status: Active » Needs review
FileSize
3.08 KB

Patch attached. Looking through the code for theme(), it seems that $hook is actually passed as second parameter to *all* preprocess functions, including the hook-specific ones. Since the parameter does not serve any use for those functions, I think it's best to leave it undocumented there...

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, thanks!

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.