hook_help($section)
docs-4-7/hooks/core.php, line 472
Provide online user help.
By implementing hook_help(), a module can make documentation available to the engine or to other modules. All user help should be returned using this hook; developer help should be provided with Doxygen/api.module comments.
For a detailed usage example, see page_example.module.
$section Drupal URL path (or: menu item) the help is being requested for, e.g. admin/node or user/edit. Recognizes special descriptors after a "#" sign. Some examples:
A localized string containing the help text. Every web link, l(), or url() must be replaced with %something and put into the final t() call: $output .= 'A role defines a group of users that have certain privileges as defined in %permission.'; $output = t($output, array('%permission' => l(t('user permissions'), 'admin/user/permission')));
| Name | Description |
|---|---|
| Hooks | Allow modules to interact with the Drupal core. |
<?php
function hook_help($section) {
switch ($section) {
case 'admin/help#block':
return t('<p>Blocks are the boxes visible in the sidebar(s)
of your web site. These are usually generated automatically by
modules (e.g. recent forum topics), but you can also create your
own blocks using either static HTML or dynamic PHP content.</p>');
break;
case 'admin/modules#description':
return t('Controls the boxes that are displayed around the main content.');
break;
}
}
?>