diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/menu.inc | 14 | ||||
-rw-r--r-- | includes/theme.inc | 4 |
2 files changed, 14 insertions, 4 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index d1aa3372c..53f1d2085 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -420,10 +420,16 @@ function menu_get_active_help() { return; } - $return = module_invoke_all('help', $path); - foreach ($return as $item) { - if (!empty($item)) { - $output .= $item ."\n"; + foreach (module_list() as $name) { + if (module_hook($name, 'help')) { + if ($temp = module_invoke($name, 'help', $path)) { + $output .= $temp . "\n"; + } + if (substr($path, 0, 6) == "admin/") { + if (module_invoke($name, 'help', 'admin/help#' . substr($path, 6))) { + $output .= theme("more_help_link", url('admin/help/' . substr($path, 6))); + } + } } } return $output; diff --git a/includes/theme.inc b/includes/theme.inc index 36181fac0..f74700c5a 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -516,6 +516,10 @@ function theme_error($message) { return '<div class="error">'. $message .'</div>'; } +function theme_more_help_link($url) { + return '<div class="more-help-link">' . t('[<a href="%link">more help...</a>]', array('%link' => $url)) . '</div><hr />'; +} + /** * Return code that emits an XML icon. */ |