public function ImageCrop::getCropDestination in Image javascript crop 7
Get the destination from the image for cropping the current style.
Parameters
$filepath Boolean, TRUE to return the filepath, FALSE to return the uri.:
File
- includes/
imagecrop.class.inc, line 308 - Imagecrop class to handle the javascript imagecrop.
Class
- ImageCrop
- @file Imagecrop class to handle the javascript imagecrop.
Code
public function getCropDestination($filepath = TRUE, $add_timestamp = TRUE) {
$image_url = $filepath ? file_create_url($this->cropDestination) : $this->cropDestination;
if ($add_timestamp) {
$image_url .= strpos($image_url, '?') !== FALSE ? '&' : '?';
$image_url .= 'time=' . $_SERVER['REQUEST_TIME'];
}
return $image_url;
}