function mediafront_is_image in MediaFront 6
Same name and namespace in other branches
- 6.2 mediafront.module \mediafront_is_image()
- 7 mediafront.module \mediafront_is_image()
Checks to see if a file is an image file.
1 call to mediafront_is_image()
- mediafront_get_media_file in ./
mediafront.module - Given a Drupal file object, this function returns the media player file object.
File
- ./
mediafront.module, line 703
Code
function mediafront_is_image($mimetype, $extension) {
$image = in_array($extension, array(
'jpg',
'jpeg',
'png',
'gif',
));
$image |= in_array($mimetype, array(
'image/jpeg',
'image/jpg',
'image/png',
'image/gif',
'jpg',
'jpeg',
'png',
'gif',
));
return $image;
}