1.20.x 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.

For more detailed information, see theme().

Parameters

$variables: The variables array (modify in place).

File

modules/system/theme.api.php, line 158

Code

function hook_preprocess_HOOK(&$variables) {
  // This example adds an RDF attribute to the image hook's variables.
  $variables['attributes']['typeof'] = array('foaf:Image');
}