function subpathauto_url_outbound_alter in Sub-pathauto (Sub-path URL Aliases) 7
Implements hook_url_outbound_alter().
File
- ./
subpathauto.module, line 38
Code
function subpathauto_url_outbound_alter(&$path, $options, $original_path) {
// If the URL is indicated as external or to be left alone and not aliased,
// skip processing.
if (!empty($options['external']) || !empty($options['alias'])) {
return;
}
$language = !empty($options['language']->language) ? $options['language']->language : NULL;
if ($alias = subpathauto_lookup_subpath('alias', $path, $original_path, $language)) {
$path = $alias;
}
}