function hook_preprocess_HOOK
7.x theme.api.php | hook_preprocess_HOOK(&$variables) |
6.x core.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
38 functions implement hook_preprocess_HOOK()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- garland_preprocess_comment_wrapper in drupal-6.x/
themes/ garland/ template.php - Add a "Comments" heading above comments except on forum pages.
- phptemplate_preprocess_page in drupal-6.x/
themes/ garland/ template.php - Override or insert PHPTemplate variables into the templates.
- template_preprocess_aggregator_feed_source in drupal-6.x/
modules/ aggregator/ aggregator.pages.inc - Process variables for aggregator-feed-source.tpl.php.
- template_preprocess_aggregator_item in drupal-6.x/
modules/ aggregator/ aggregator.pages.inc - Process variables for aggregator-item.tpl.php.
- template_preprocess_aggregator_summary_item in drupal-6.x/
modules/ aggregator/ aggregator.pages.inc - Process variables for aggregator-summary-item.tpl.php.
File
- documentation-6.x/
developer/ hooks/ core.php, line 2302 - These are the hooks that are invoked by the Drupal core.
Code
function hook_preprocess_HOOK(&$variables) {
$variables['drupal_major_version'] = '6.x';
}