public static function get_blog_image_path($blog_image, $blog_image_t1, $blog_image_t2, $hiRes = FALSE) { if (!$hiRes) { if ($blog_image_t1 && file_exists(IMAGES_B_T . $blog_image_t1)) { return IMAGES_B_T . $blog_image_t1; } if ($blog_image_t1 && file_exists(IMAGES_B . $blog_image_t1)) { return IMAGES_B . $blog_image_t1; } if ($blog_image_t2 && file_exists(IMAGES_B_T . $blog_image_t2)) { return IMAGES_B_T . $blog_image_t2; } if ($blog_image_t2 && file_exists(IMAGES_B . $blog_image_t2)) { return IMAGES_B . $blog_image_t2; } if ($blog_image && file_exists(IMAGES_B . $blog_image)) { return IMAGES_B . $blog_image; } } else { if ($blog_image && file_exists(IMAGES_B . $blog_image)) { return IMAGES_B . $blog_image; } if ($blog_image_t2 && file_exists(IMAGES_B . $blog_image_t2)) { return IMAGES_B . $blog_image_t2; } if ($blog_image_t2 && file_exists(IMAGES_B_T . $blog_image_t2)) { return IMAGES_B_T . $blog_image_t2; } if ($blog_image_t1 && file_exists(IMAGES_B . $blog_image_t1)) { return IMAGES_B . $blog_image_t1; } if ($blog_image_t1 && file_exists(IMAGES_B_T . $blog_image_t1)) { return IMAGES_B_T . $blog_image_t1; } } return FALSE; }
/** * Get the closest image available * @param $image * @param $thumb1 * @param $thumb2 * @param bool $hires - true for image, false for thumbnail * @return bool|string */ function get_blog_image_path($image, $thumb1, $thumb2, $hires = FALSE) { return \PHPFusion\Blog\Functions::get_blog_image_path($image, $thumb1, $thumb2, $hires); }