function _focal_point_images_save in Focal Point 7
Save the focal point for the provided images.
Parameters
array $images: An array of image field data arrays normally found attached to a loaded entity. This is typically loaded via an entity_metadata_wrapper.
1 call to _focal_point_images_save()
- focal_point_field_attach_presave in ./
focal_point.module - Implements hook_field_attach_presave().
File
- ./
focal_point.module, line 576
Code
function _focal_point_images_save($images) {
// If there is only one image, then the "fid" property will exist.
$images = isset($images['fid']) ? array(
$images,
) : $images;
foreach ($images as $image) {
if (isset($image['focal_point'])) {
focal_point_save($image['fid'], $image['focal_point']);
}
}
}