| 6 core.php | hook_preprocess_HOOK(&$variables) |
| 7 theme.api.php | hook_preprocess_HOOK(&$variables) |
| 8 theme.api.php | hook_preprocess_HOOK(&$variables) |
Preprocess theme variables for a specific theme hook.
This hook allows modules to preprocess theme variables for a specific theme hook. It should only be used if a module needs to override or add to the theme preprocessing for a theme hook it didn't define.
Note that, as all preprocess hooks, this hook is only invoked for theme hooks implemented as template files, but not those implemented as theme functions.
For more detailed information, see theme().
Parameters
$variables: The variables array (modify in place).
Related topics
File
- developer/
hooks/ core.php, line 2297 - These are the hooks that are invoked by the Drupal core.
Code
function hook_preprocess_HOOK(&$variables) {
$variables['drupal_major_version'] = '6.x';
}
Login or register to post comments