function focal_point_preprocess_image_widget in Focal Point 7
Implements template_preprocess_image_widget().
File
- ./
focal_point.module, line 236
Code
function focal_point_preprocess_image_widget(&$variables) {
$element =& $variables['element'];
// Add the "indicator" to the default image widget.
if (isset($element['preview']) && isset($element['#focal_point_id'])) {
unset($element['preview']['#weight']);
$preview = array(
'indicator' => _focal_point_indicator($element['#focal_point_id']),
'thumbnail' => $element['preview'],
'preview_link' => _focal_point_preview_link($element['#file']->fid, $element['#focal_point_id'], isset($element['focal_point']['#default_value']) ? $element['focal_point']['#default_value'] : FOCAL_POINT_DEFAULT),
);
$element['preview'] = $preview;
$element['focal_point_help'] = _focal_point_help();
}
}