You are here

function _focal_point_supported_file in Focal Point 7

Determine whether or not the provided file entity can support a focal_point.

Parameters

mixed $file: Either a loaded file object or an fid.

Return value

bool TRUE if the given file entity is of a supported type.

1 call to _focal_point_supported_file()
_focal_point_form_append_focal_point_preview in ./focal_point.module
Append the focal point preview field to file edit forms.

File

./focal_point.module, line 636

Code

function _focal_point_supported_file($file) {
  if (is_int($file)) {
    $file = file_load($file);
  }
  $supported_file_types = array(
    'image',
  );
  drupal_alter('focal_point_supported_file_types', $supported_file_types);
  return in_array($file->type, $supported_file_types);
}