function hook_focal_point_pre_save_alter in Focal Point 7
Alters the Focal Point before saving it to the database.
Parameters
string $focal_point: The focal point to be saved (an anchor point in the "[0-100],[0-100]" format).
int $fid: The FileID.
string $original_focal_point: The original focal_point if updating (could be NULL)
1 invocation of hook_focal_point_pre_save_alter()
- _focal_point_save in ./
focal_point.module - Helper function to save a FocalPoint record, and invoke related hooks.
File
- ./
focal_point.api.php, line 87 - Documentation of Feeds hooks.
Code
function hook_focal_point_pre_save_alter(&$focal_point, $fid, $original_focal_point) {
// Alter the focal point for FID = 1 if the original focal point is empty.
if (1 == $fid && empty($original_focal_point)) {
$focal_point = '10,10';
}
}