function theme_focal_point_image_resize_summary in Focal Point 7
Replacement for the standard theme_image_resize_summary function.
Returns HTML for a summary of an image resize effect, adding information about a shifted focal point to markup when necessary.
Parameters
array $variables: An associative array containing the same attributes as theme_image_resize_summary, but with added support for the shift_x and shift_y values.
Return value
string The rendered summary string for the effects overview page.
See also
1 theme call to theme_focal_point_image_resize_summary()
- theme_focal_point_image_crop_summary in ./
focal_point.theme.inc - Replacement for the standard theme_image_crop_summary function.
File
- ./
focal_point.theme.inc, line 60 - Theme functions defined by focal_point.
Code
function theme_focal_point_image_resize_summary($variables) {
$data = $variables['data'];
// Determine whether to summarize the shift X/Y configuration for this effect.
$shift_x = isset($variables['data']['focal_point_advanced']['shift_x']) ? (int) $variables['data']['focal_point_advanced']['shift_x'] : '0';
$shift_y = isset($variables['data']['focal_point_advanced']['shift_y']) ? (int) $variables['data']['focal_point_advanced']['shift_y'] : '0';
$theme_shift = '';
if ($shift_x || $shift_y) {
$args = array(
'%shift_x' => format_plural($shift_x, '1 pixel', '@count pixels'),
'%shift_y' => format_plural($shift_y, '1 pixel', '@count pixels'),
);
$theme_shift = ' <em>' . t('(shifted %shift_x horizontally and %shift_y vertically)', $args) . '</em>';
}
return theme('image_resize_summary', array(
'data' => $data,
)) . $theme_shift;
}