xmlsitemap_file_create_url($path, $alias = NULL)
contributions/modules/xmlsitemap/xmlsitemap.module, line 354
Modified version of file_create_url(). Allows us to remove language prefixes.
$path: the path to the file
A URL to the file
| Name | Description |
|---|---|
| XML Sitemap | Notify search engines of site updates. |
function xmlsitemap_file_create_url($path, $alias = NULL) {
$path = trim(substr($path, strlen(file_directory_path())), '\\/');
if (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PRIVATE) {
return xmlsitemap_url('system/files/'. $path, $alias, NULL, NULL, TRUE);
}
else {
return "$GLOBALS[base_url]/". file_directory_path() .'/'. str_replace('\\', '/', $path);
}
}