$render_function = 'theme_render_template';
$extension = '.tpl.php';
$variables_cue = array();
global $theme_engine;
if (isset($theme_engine)) {
$variables_cue[] = '_'. $theme_engine .'_variables';
$variables_cue[] = $theme_engine .'_variables';
$variables_cue[] = '_'. $theme_engine .'_variables_'. $hook;
$variables_cue[] = $theme_engine .'_variables_'. $hook;
if ($info['type'] != 'module' && function_exists($theme_engine .'_render_template')) {
$render_function = $theme_engine .'_render_template';
}
$var_functions_cue = $theme_engine .'_var_functions_que';
if (function_exists($var_functions_cue)) {
$variables_cue = $var_functions_cue($variables_cue, $info);
}
}
global $theme;
$variables_cue[] = $theme .'_variables';
$variables_cue[] = $theme .'_variables_'. $hook;
$args = array(&$variables, $hook);
foreach ($variables_cue as $variables_function) {
if (function_exists($variables_function)) {
call_user_func_array($variables_function, $args);
}
}
if (isset($variables['extension'])) {
$extension = $variables['extension'];
}
if (isset($variables['render'])) {
$render_function = $variables['render'];
}