function advanced_help_get_topic_filename in Advanced Help 5
Same name and namespace in other branches
- 6 advanced_help.module \advanced_help_get_topic_filename()
- 7 advanced_help.module \advanced_help_get_topic_filename()
Load and render a help topic.
2 calls to advanced_help_get_topic_filename()
- advanced_help_update_index in ./
advanced_help.module - Implementation of hook_update_index().
- advanced_help_view_topic in ./
advanced_help.module - Load and render a help topic.
File
- ./
advanced_help.module, line 430 - advanced_help.module
Code
function advanced_help_get_topic_filename($module, $topic) {
init_theme();
global $language;
$info = advanced_help_get_topic($module, $topic);
if (empty($info)) {
return;
}
// Search paths:
$paths = array(
path_to_theme() . '/help',
// Allow theme override.
drupal_get_path('module', $module) . "/translations/help/{$language->language}",
// Translations.
$info['path'],
);
foreach ($paths as $path) {
if (file_exists("./{$path}/{$info['file']}")) {
return "./{$path}/{$info['file']}";
}
}
}