diff options
-rw-r--r-- | includes/menu.inc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index be4b052f2..ca2088fef 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -4,11 +4,11 @@ /** * Register a menu item with the menu system. */ -function menu($path, $title, $callback = NULL, $help = NULL, $weight = 0, $hidden = 0) { +function menu($path, $title, $callback = NULL, $weight = 0, $hidden = 0) { global $_list; // add the menu to the flat list of menu items: - $_list[$path] = array("title" => $title, "callback" => $callback, "help" => $help, "weight" => $weight, "hidden" => $hidden); + $_list[$path] = array("title" => $title, "callback" => $callback, "weight" => $weight, "hidden" => $hidden); } /** @@ -63,11 +63,16 @@ function menu_get_active_title() { * Returns the help associated with the active menu item. */ function menu_get_active_help() { - global $_list; + $path = $_GET["q"]; + $output = ""; - if ($path = menu_get_active_item()) { - return $_list[$path]["help"]; + $return = module_invoke_all("help", $path); + foreach ($return as $item) { + if (!empty($item)) { + $output .= $item ."\n"; + } } + return $output; } /** |