? hook-help-154064-26.patch
? hook-help-154064-28.patch
Index: core.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/docs/developer/hooks/core.php,v
retrieving revision 1.158
diff -u -p -r1.158 core.php
--- core.php	8 Nov 2007 08:51:20 -0000	1.158
+++ core.php	11 Nov 2007 01:00:34 -0000
@@ -533,19 +533,26 @@ function hook_forms() {
  * returned using this hook; developer help should be provided with
  * Doxygen/api.module comments.
  *
- * @param $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:
- *   - admin/modules#name
- *     The name of a module (unused, but there)
+ * @param $path
+ *   a Drupal menu router path the help is being requested for, e.g.
+ *   admin/node or user/edit. If the router path includes a % wildcard,
+ *   then this will appear in the path - for example all node pages will
+ *   have the path node/% or node/%/view.
+ *   Also recognizes special descriptors after a "#" sign. Some examples:
  *   - admin/help#modulename
  *     The module's help text, displayed on the admin/help page and through
  *     the module's individual help link.
  *   - user/help#modulename
  *     The help for a distributed authorization module (if applicable).
- *   - node/add#nodetype
- *     The description of a node type (if applicable).
+ * @param $arg
+ *   An array that corresponds to the return of the arg() function - if a module
+ *   needs to provide help for a page with additional parameters after the
+ *   Drupal path or help for a specific value for a wildcard in the path, then
+ *   the values in this array can be referenced.  For example you could provide
+ *   help for user/1 by looking for the path user/% and $arg[1] == '1'.  This
+ *   array should always be used rather than directly invoking arg(). Note that
+ *   depending on which module is invoking hook_help, $arg may contain only,
+ *   empty strings.  Regardless, $arg[0] to $arg[11] will always be set.
  * @return
  *   A localized string containing the help text. Every web link, l(), or
  *   url() must be replaced with %something and put into the final t()
@@ -557,8 +564,8 @@ function hook_forms() {
  *
  * For a detailed usage example, see page_example.module.
  */
-function hook_help($section) {
-  switch ($section) {
+function hook_help($path, $arg) {
+  switch ($path) {
     case 'admin/help#block':
       return '<p>'. t('Blocks are boxes of content that may be rendered into certain regions of your web pages, for example, into sidebars. Blocks are usually generated automatically by modules (e.g., Recent Forum Topics), but administrators can also define custom blocks.') .'</p>';
 
