function theme_manualcrop_crop_and_scale_summary in Manual Crop 7
Returns HTML for a summary of an image crop and scale effect.
Parameters
$variables: An associative array containing:
- data: The current configuration for this crop and scale effect.
Return value
Summary HTML.
File
- ./
manualcrop.admin.inc, line 86 - Admin functionality for the Manual Crop module.
Code
function theme_manualcrop_crop_and_scale_summary($variables) {
$data = $variables["data"];
$str = check_plain($data['width']) . 'x' . check_plain($data['height']);
if ($data['upscale'] || $data['respectminimum'] || !empty($data['respectminimum'])) {
$str .= ' (' . ($data['upscale'] ? t('upscaling allowed') : '');
if ($data['upscale'] && ($data['respectminimum'] || !empty($data['onlyscaleifcrop']))) {
$str .= $data['respectminimum'] && !empty($data['onlyscaleifcrop']) ? ', ' : ' ' . t('and') . ' ';
}
if ($data['respectminimum']) {
$str .= t('crop minimum dimensions') . (!empty($data['onlyscaleifcrop']) ? ' ' . t('and') . ' ' : '');
}
if (!empty($data['onlyscaleifcrop'])) {
$str .= t('only scale if cropped');
}
$str .= ')';
}
return $str;
}