function theme_imagefield_crop_widget_preview in Imagefield Crop 6
File
- ./
imagefield_crop.module, line 209
Code
function theme_imagefield_crop_widget_preview($item = NULL) {
if (is_null($item) || empty($item['filepath'])) {
return '<!-- link to default admin thumb -->';
}
$thumb_path = imagefield_file_admin_thumb_path($item);
// A dummy query-string is added to filenames, to gain control over
// browser-caching. The string changes on every update or full cache
// flush, forcing browsers to load a new copy of the files, as the
// URL changed.
// This technique was copied from common.inc, see css_js_query_string
// documentation
$query_string = '?' . variable_get('imagefield_crop_query_string', REQUEST_TIME);
return '<img src="' . file_create_url($thumb_path) . $query_string . '" />';
}