Commit 0f44d7d6 authored by Dries's avatar Dries

- Committed part 3 of Michael's help system improvements: removed the $help

  parameter from the menu() function.
parent b11d99fe
......@@ -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;
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment