function _focal_point_get_image_styles in Focal Point 7
Get a list of all image styles that use a focal point effect.
Return value
array A subset of the array returned by image_styles().
See also
1 call to _focal_point_get_image_styles()
- _focal_point_preview in ./
focal_point.module - Allows previewing of derivitive images based on the given focal point.
File
- ./
focal_point.module, line 698
Code
function _focal_point_get_image_styles() {
// Load all image styles defined on this site and filter out those that do
// not use a focal point effect.
module_load_include('inc', 'focal_point', 'focal_point.effects');
$focal_point_effects = array_keys(focal_point_image_effect_info());
$focal_point_styles = array();
$styles = image_styles();
foreach ($styles as $isid => $style) {
foreach ($style['effects'] as $effect) {
$focal_point_style = in_array($effect['name'], $focal_point_effects, TRUE);
if ($focal_point_style) {
// We found at least one effect within this style that uses Focal Point.
$focal_point_styles[$isid] = $style;
break;
}
}
}
return $focal_point_styles;
}