node_example_help

  1. drupal
    1. 4.7
    2. 7 node_example.module
Versions
4.7 node_example_help($section)
7 node_example_help($path, $arg)

Implementation of hook_help().

Throughout Drupal, hook_help() is used to display help text at the top of pages. Some other parts of Drupal pages get explanatory text from these hooks as well. We use it here to provide a description of the module on the module administration page.

Code

developer/examples/node_example.module, line 34

<?php
function node_example_help($section) {
  switch ($section) {
    case 'admin/modules#description':
      // This description is shown in the listing at admin/modules.
      return t('An example module showing how to define a custom node type.');
    case 'node/add#node_example':
      // This description shows up when users click "create content."
      return t('This is an example node type with a few fields.');
  }
}
?>