You are here

function _image_url_formatter_get_absolute_file_url in Image URL Formatter 7

Returns an absolute url.

3 calls to _image_url_formatter_get_absolute_file_url()
image_url_formatter_convert_full_url in ./image_url_formatter.module
Converts a full URL to the choosen format.
_image_url_formater_get_filename in ./image_url_formatter.module
Returns the filename from the url.
_image_url_formatter_get_relative_file_url in ./image_url_formatter.module
Returns a relative url.

File

./image_url_formatter.module, line 272
Add an URL formatter for image field

Code

function _image_url_formatter_get_absolute_file_url($url) {
  global $base_url;
  if (strpos($url, $base_url) === 0) {
    $url = base_path() . ltrim(str_replace($GLOBALS['base_url'], '', $url), '/');
  }
  return $url;
}