function manualcrop_instance_required_styles in Manual Crop 7
Get the list of required image styles from the widget settings.
Parameters
$settings: Widget settings array.
Return value
List of required image styles.
2 calls to manualcrop_instance_required_styles()
- manualcrop_croptool_process in ./
manualcrop.helpers.inc - Add a croptool to the form element. This extends the FAPI widget or simply adds a new form item to enable cropping in a regular form.
- _manualcrop_attach_dependencies in ./
manualcrop.helpers.inc - Attach the required croptool dependencies (files and settings).
File
- ./
manualcrop.helpers.inc, line 113 - Helper functions for the Manual Crop module.
Code
function manualcrop_instance_required_styles($settings) {
// Make sure to exclude unavailable styles.
if (!empty($settings['manualcrop_require_cropping'])) {
if ($settings['manualcrop_styles_mode'] == 'include' && !empty($settings['manualcrop_styles_list'])) {
return array_intersect($settings['manualcrop_require_cropping'], $settings['manualcrop_styles_list']);
}
elseif ($settings['manualcrop_styles_mode'] == 'exclude') {
return array_diff($settings['manualcrop_require_cropping'], $settings['manualcrop_styles_list']);
}
}
return array();
}