| 7 system.api.php | hook_url_inbound_alter(&$path, $original_path, $path_language) |
| 8 system.api.php | hook_url_inbound_alter(&$path, $original_path, $path_language) |
Alters inbound URL requests.
Parameters
$path: The path being constructed, which, if a path alias, has been resolved to a Drupal path by the database, and which also may have been altered by other modules before this one.
$original_path: The original path, before being checked for path aliases or altered by any modules.
$path_language: The language of the path.
See also
Related topics
1 function implements hook_url_inbound_alter()
1 invocation of hook_url_inbound_alter()
File
- modules/
system/ system.api.php, line 4116 - Hooks provided by Drupal core and the System module.
Code
function hook_url_inbound_alter(&$path, $original_path, $path_language) {
// Create the path user/me/edit, which allows a user to edit their account.
if (preg_match('|^user/me/edit(/.*)?|', $path, $matches)) {
global $user;
$path = 'user/' . $user->uid . '/edit' . $matches[1];
}
}
Login or register to post comments
Comments
This replaces
This replaces custom_url_rewrite_inbound() from Drupal 6.