menu_get_active_help

Versions
4.6 – 7
menu_get_active_help()

Returns the help associated with the active menu item.

Related topics

▾ 3 functions call menu_get_active_help()

chameleon_page in themes/chameleon/chameleon.theme
theme_page in includes/theme.inc
Return an entire Drupal page displaying the supplied content.
xtemplate_page in themes/engines/xtemplate/xtemplate.engine

Code

includes/menu.inc, line 434

<?php
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
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.