You are here

function _variable_file_get_path in Variable Extra 7

Get file path.

2 calls to _variable_file_get_path()
variable_file_format_file in variable_file/variable_file.variable.inc
Variable format callback. Generic file.
variable_file_format_image in variable_file/variable_file.variable.inc
Variable format callback. Image.

File

variable_file/variable_file.variable.inc, line 279
Variable module hook implementations

Code

function _variable_file_get_path($variable) {
  if (!empty($variable['value'])) {
    if (!empty($variable['file managed'])) {
      $file = file_load($variable['value']);
      return $file ? $file->uri : '';
    }
    else {
      return $variable['value'];
    }
  }
}