function lightbox2_check_filefield_image_extension in Lightbox2 8
Same name and namespace in other branches
- 6 lightbox2.module \lightbox2_check_filefield_image_extension()
- 7.2 lightbox2.module \lightbox2_check_filefield_image_extension()
- 7 lightbox2.module \lightbox2_check_filefield_image_extension()
Suitability callback function for the image filefield formatter.
Parameters
$file: The file object, containing filepath, mime type, etc.
$field: CCK field information.
Return value
True if file extension is supported.
1 string reference to 'lightbox2_check_filefield_image_extension'
- lightbox2_file_formatter_info in ./
lightbox2.module - Implementation of filefield's hook_file_formatter_info().
File
- ./
lightbox2.module, line 1525 - Enables the use of lightbox2 which places images above your current page, not within. This frees you from the constraints of the layout, particularly column widths.
Code
function lightbox2_check_filefield_image_extension($file, $field) {
$ext = array_pop(explode('.', $file->filename));
return lightbox2_supported_file_extension($ext, 'image');
}