summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/menu.inc21
1 files changed, 10 insertions, 11 deletions
diff --git a/includes/menu.inc b/includes/menu.inc
index 2cd620770..bba9391ff 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -1220,17 +1220,16 @@ function menu_get_active_help() {
$arg = drupal_help_arg(arg(NULL));
$empty_arg = drupal_help_arg();
- foreach (module_list() as $name) {
- if (module_hook($name, 'help')) {
- // Lookup help for this path.
- if ($help = module_invoke($name, 'help', $router_path, $arg)) {
- $output .= $help . "\n";
- }
- // Add "more help" link on admin pages if the module provides a
- // standalone help page.
- if ($arg[0] == "admin" && module_exists('help') && module_invoke($name, 'help', 'admin/help#' . $arg[2], $empty_arg) && $help) {
- $output .= theme("more_help_link", url('admin/help/' . $arg[2]));
- }
+ foreach (module_implements('help') as $module) {
+ $function = $module . '_help';
+ // Lookup help for this path.
+ if ($help = $function($router_path, $arg)) {
+ $output .= $help . "\n";
+ }
+ // Add "more help" link on admin pages if the module provides a
+ // standalone help page.
+ if ($arg[0] == "admin" && module_exists('help') && $function('admin/help#' . $arg[2], $empty_arg) && $help) {
+ $output .= theme("more_help_link", url('admin/help/' . $arg[2]));
}
}
return $output;