menu_get_active_help

5 menu.inc menu_get_active_help()
6 menu.inc menu_get_active_help()
7 menu.inc menu_get_active_help()
8 menu.inc menu_get_active_help()

Returns the help associated with the active menu item.

Related topics

2 calls to menu_get_active_help()

File

includes/menu.inc, line 500
API for the Drupal menu system.

Code

function menu_get_active_help() {
  $path = $_GET['q'];
  $output = '';

  if (!_menu_item_is_accessible(menu_get_active_item())) {
    // Don't return help text for areas the user cannot access.
    return;
  }

  foreach (module_list() as $name) {
    if (module_hook($name, 'help')) {
      if ($temp = module_invoke($name, 'help', $path)) {
        $output .= $temp . "\n";
      }
      if (module_hook('help', 'page')) {
        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;
}
Login or register to post comments