public static function get_download_image_path($download_image, $download_image_thumb, $hiRes = false)
{
if (!$hiRes) {
if ($download_image_thumb && file_exists(DOWNLOADS . 'images/thumbs/' . $download_image_thumb)) {
return DOWNLOADS . 'images/thumbs/' . $download_image_thumb;
}
if ($download_image_thumb && file_exists(DOWNLOADS . 'images/thumbs/' . $download_image_thumb)) {
return DOWNLOADS . 'images/thumbs/' . $download_image_thumb;
}
if ($download_image && file_exists(DOWNLOADS . 'images/' . $download_image)) {
return DOWNLOADS . 'images/' . $download_image;
}
} else {
if ($download_image && file_exists(DOWNLOADS . 'images/' . $download_image)) {
return DOWNLOADS . 'images/' . $download_image;
}
if ($download_image_thumb && file_exists(DOWNLOADS . 'images/' . $download_image_thumb)) {
return DOWNLOADS . 'images/' . $download_image_thumb;
}
if ($download_image_thumb && file_exists(DOWNLOADS . 'images/thumbs/' . $download_image_thumb)) {
return DOWNLOADS . 'images/thumbs/' . $download_image_thumb;
}
}
return false;
}
/** * Get the closest image available * @param $image * @param $thumb1 * @param bool $hires - true for image, false for thumbnail * @return bool|string */ function get_download_image_path($image, $thumb1, $hires = FALSE) { return \PHPFusion\Downloads\Functions::get_download_image_path($image, $thumb1, $hires); }