diff --git a/subpathauto.module b/subpathauto.module index ea5802c..4a4aecb 100644 --- a/subpathauto.module +++ b/subpathauto.module @@ -20,7 +20,6 @@ function subpathauto_menu() { * Implements hook_url_inbound_alter(). */ function subpathauto_url_inbound_alter(&$path, $original_path, $language) { - // If the current menu item exists at this path, then we should not continue // processing. // @@ -43,12 +42,20 @@ function subpathauto_url_inbound_alter(&$path, $original_path, $language) { } /** - * This is a re-write of the menu_get_item api function but with the code that - * triggers menu_rebuild() stripped out. This is to avoid triggering the theme - * layer too early in the bootstrap. Please use menu_get_item where appropriate - * instead of this function. + * Lightweight alternative to menu_get_item(). + * + * This is a re-write of the menu_get_item API function but with the code that + * triggers menu_rebuild() stripped out, for the sole purpose of avoiding + * triggering the theme layer too early in the bootstrap. Note: menu_get_item() + * should still be used instead of this function unless the theme specifically + * should not be loaded. + * + * @param string $path + * The path; for example, 'node/5'. The function will find the corresponding + * node/% item and return that. Defaults to the current path. * * @see menu_get_item() + * @see subpathauto_url_inbound_alter() */ function subpathauto_lightweight_menu_get_item($path) { $original_map = arg(NULL, $path);