function _focal_point_supported_field_type in Focal Point 7
Determine wether or not the given widget type is supported.
Support is based on the site configuration.
Parameters
string $type: The type of image field in question (image || media).
Return value
bool TRUE if the given field type is supported by focal point.
2 calls to _focal_point_supported_field_type()
- _focal_point_form_append_focal_point_preview in ./
focal_point.module - Append the focal point preview field to file edit forms.
- _focal_point_supported_widget_type in ./
focal_point.module - Determine whether or not the provided field can use focal point support.
File
- ./
focal_point.module, line 622
Code
function _focal_point_supported_field_type($type) {
$enabled_for = variable_get('focal_point_enabled_for', array(
'image',
'media',
));
return in_array($type, $enabled_for, TRUE);
}