You are here

function menu_get_active_help in Drupal 7

Same name and namespace in other branches
  1. 4 includes/menu.inc \menu_get_active_help()
  2. 5 includes/menu.inc \menu_get_active_help()
  3. 6 includes/menu.inc \menu_get_active_help()

Returns the help associated with the active menu item.

Related topics

1 call to menu_get_active_help()
system_block_view in modules/system/system.module
Implements hook_block_view().

File

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

Code

function menu_get_active_help() {
  $output = '';
  $router_path = menu_tab_root_path();

  // We will always have a path unless we are on a 403 or 404.
  if (!$router_path) {
    return '';
  }
  $arg = drupal_help_arg(arg(NULL));
  foreach (module_implements('help') as $module) {
    $function = $module . '_help';

    // Lookup help for this path.
    if ($help = $function($router_path, $arg)) {
      $output .= $help . "\n";
    }
  }
  return $output;
}