From 75b8f880fc0213d8addd6160c09f988878dbbc20 Mon Sep 17 00:00:00 2001 From: webchick <webchick@24967.no-reply.drupal.org> Date: Wed, 8 Jun 2011 21:58:08 -0700 Subject: [PATCH] Issue #1168686 by barbi, Dave Reid: Fixed hook_menu() doc should say how to pass integer arg to callbacks. --- modules/system/system.api.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/system/system.api.php b/modules/system/system.api.php index 18cd7fe7755b..ec3f55aae1fe 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -947,8 +947,11 @@ function hook_menu_get_item_alter(&$router_item, $path, $original_map) { * called, the corresponding path components will be substituted for the * integers. That is, the integer 0 in an argument list will be replaced with * the first path component, integer 1 with the second, and so on (path - * components are numbered starting from zero). This substitution feature allows - * you to re-use a callback function for several different paths. For example: + * components are numbered starting from zero). To pass an integer without it + * being replaced with its respective path component, use the string value of + * the integer (e.g., '1') as the argument value. This substitution feature + * allows you to re-use a callback function for several different paths. For + * example: * @code * function mymodule_menu() { * $items['abc/def'] = array( -- GitLab