You are here

function flag_template_preprocess in Flag 5

Call module flag preprocess functions for Drupal 5.

The preprocess functions for themes and phptemplate can be done in _phptemplate_variables(), but this adds preprocessing to modules that don't have this access in Drupal 5.

Parameters

$hook: The name of the template file hook whose variables are being preprocessed.

$variables: The existing variables that will be passed to the template file.

2 calls to flag_template_preprocess()
flag_phptemplate_adapter in ./flag.module
In Drupal 5 it is possible to put a phptemplate_flag() function in your 'template.php', and within that function instructions to make Drupal scan for various template files for theming a flag.
theme_flag in ./flag.module
Theme an individual link and a message after the link is marked.

File

./flag.module, line 743
The Flag module.

Code

function flag_template_preprocess($hook, &$variables) {
  if (function_exists('template_preprocess_' . $hook)) {
    $function = 'template_preprocess_' . $hook;
    $function($variables);
  }
  foreach (module_implements('preprocess_' . $hook) as $module) {
    $function = $module . '_preprocess_' . $hook;
    $function($variables);
  }
}