function _focal_point_supported_widget_type in Focal Point 7
Determine whether or not the provided field can use focal point support.
Parameters
string $type: A drupal field widget type.
Return value
bool TRUE if the given widget type is supported by focal point.
2 calls to _focal_point_supported_widget_type()
- focal_point_field_attach_presave in ./
focal_point.module - Implements hook_field_attach_presave().
- focal_point_field_widget_form_alter in ./
focal_point.module - Implements hook_field_widget_form_alter().
File
- ./
focal_point.module, line 596
Code
function _focal_point_supported_widget_type($type) {
$supported = FALSE;
if (_focal_point_supported_field_type('image')) {
$supported_widget_types = array(
'image_image',
'image_miw',
);
drupal_alter('focal_point_supported_widget_types', $supported_widget_types);
if (in_array($type, $supported_widget_types)) {
$supported = TRUE;
}
}
return $supported;
}