Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | 0001-Change-docs-to-reflect-that-theme-preprocess-functio.patch | 3.08 KB | mr.baileys |
Comments
Comment #1
jhodgdonThanks! This does indeed look like a problem. D6 only (it was fixed in d7).
Comment #2
mr.baileysPatch 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...
Comment #3
jhodgdonLooks good, thanks!
Comment #4
Gábor HojtsyCommitted, thanks.