function theme_canvasactions_resizepercent_summary in ImageCache Actions 7
Same name and namespace in other branches
- 8 canvasactions/canvasactions.inc \theme_canvasactions_resizepercent_summary()
Implements theme_hook() for the resize percent effect summary.
Parameters
array $variables: An associative array containing:
- data: The current configuration for this image effect.
Return value
string The HTML for the summary of this image effect.
File
- canvasactions/
canvasactions.inc, line 1056
Code
function theme_canvasactions_resizepercent_summary(array $variables) {
$data = _canvasactions_resizepercent_calculate_percent($variables['data']);
if (!$data) {
return t('Invalid effect data');
}
if ($data['width'] != $data['height']) {
return t('@width%x@height%', array(
'@width' => 100 * $data['width'],
'@height' => 100 * $data['height'],
));
}
else {
return t('scale to @percent%', array(
'@percent' => (double) 100 * $data['height'],
));
}
}