You are here

function advanced_forum_add_template_suggestions in Advanced Forum 7.2

Same name and namespace in other branches
  1. 6.2 includes/style.inc \advanced_forum_add_template_suggestions()

Manipulate the template suggestions to add in one for each style as well as the default.

21 calls to advanced_forum_add_template_suggestions()
advanced_forum_preprocess_advanced_forum_active_poster in includes/theme.inc
Preprocesses template variables for the active poster template.
advanced_forum_preprocess_advanced_forum_forum_legend in includes/theme.inc
Preprocesses template variables for the forum legend template.
advanced_forum_preprocess_advanced_forum_search_forum in includes/theme.inc
Preprocesses template variables for the forum search form template.
advanced_forum_preprocess_advanced_forum_search_topic in includes/theme.inc
Preprocess forum search topic.
advanced_forum_preprocess_advanced_forum_statistics in includes/theme.inc
Preprocesses template variables for the forum statistics template.

... See full list

File

includes/style.inc, line 396
Functions relating to the style system, not including core hooks and preprocess / theme functions.

Code

function advanced_forum_add_template_suggestions($template, &$variables) {

  // Adjust template name.
  $template = strtr($template, '-', '_');
  if (strpos($template, 'advanced_forum') === FALSE) {
    $template = "advanced_forum_" . $template;
  }

  // Set AF template as most significant suggestion.
  $variables['theme_hook_suggestion'] = $template;
  $variables['theme_hook_suggestions'][] = $template;
  return;
}