drupal_get_normal_path

Definition

drupal_get_normal_path($path)
includes/path.inc, line 118

Description

Given a path alias, return the internal path it represents.

Parameters

$path A Drupal path alias.

Return value

The internal path represented by the alias, or the original alias if no internal path was found.

Code

<?php
function drupal_get_normal_path($path) {
  $result = $path;
  if ($src = drupal_lookup_path('source', $path)) {
    $result = $src;
  }
  if (function_exists('custom_url_rewrite')) {
    $result = custom_url_rewrite('source', $result, $path);
  }
  return $result;
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.