You are here

function advanced_forum_call_preprocess in Advanced Forum 5

Backports the template preprocess system.

10 calls to advanced_forum_call_preprocess()
advanced_forum_addvars in ./advanced_forum.module
Provides D5 compatability wrapper for node/comment preprocess functions.
phptemplate_forum_display in ./advanced_forum.module
Implementation of theme_forum_display().
phptemplate_forum_icon in ./advanced_forum.module
Implementation of theme_forum_icon
phptemplate_forum_list in ./advanced_forum.module
Implementation of theme_forum_list().
phptemplate_forum_submitted in ./advanced_forum.module

... See full list

File

./d6_compat.inc, line 346
Code needed to backport functionality from D6.

Code

function advanced_forum_call_preprocess($hook, &$variables) {

  // First, hit the template_preprocesses.
  if (function_exists("template_preprocess_" . $hook)) {
    $function = "template_preprocess_" . $hook;
    $function($variables);
  }

  // Then let the modules at it.
  foreach (module_implements("preprocess_{$hook}") as $module) {
    $function = $module . '_preprocess_' . $hook;
    $function($variables);
  }

  // Finally let the theme have its say.
  $theme_name = variable_get('theme_default', '');
  if (function_exists($theme_name . '_preprocess_' . $hook)) {
    $function = $theme_name . '_preprocess_' . $hook;
    $function($variables);
  }
}