drupal_get_path_alias

5 path.inc drupal_get_path_alias($path)
6 path.inc drupal_get_path_alias($path, $path_language = '')
7 path.inc drupal_get_path_alias($path = NULL, $path_language = NULL)
8 path.inc drupal_get_path_alias($path = NULL, $langcode = NULL)

Given an internal Drupal path, return the alias set by the administrator.

3 calls to drupal_get_path_alias()

File

includes/bootstrap.inc, line 374
Functions that need to be loaded on every Drupal request.

Code

function drupal_get_path_alias($path) {
  if (($map = drupal_get_path_map()) && ($newpath = array_search($path, $map))) {
    return $newpath;
  }
  elseif (function_exists('conf_url_rewrite')) {
    return conf_url_rewrite($path, 'outgoing');
  }
  else {
    // No alias found. Return the normal path.
    return $path;
  }
}
Login or register to post comments