You are here

function _epsacrop_thumb_filepath in EPSA Crop - Image Cropping 6

Same name and namespace in other branches
  1. 6.2 epsacrop.module \_epsacrop_thumb_filepath()
1 call to _epsacrop_thumb_filepath()
theme_epsacrop_widget_item in ./epsacrop.module
fonction theme qui ajouter le lien gérer le crop

File

./epsacrop.module, line 378
The main file of module

Code

function _epsacrop_thumb_filepath($filepath, $create = TRUE) {
  if (empty($filepath)) {
    return FALSE;
  }
  $short_path = preg_replace('/^' . preg_quote(file_directory_path(), '/') . '/', '', $filepath);
  $dest = file_directory_path() . '/epsacrop_thumbs' . $short_path;
  if ($create) {
    _epsacrop_create_thumb($filepath, $dest);
  }
  return $dest;
}