function _magnific_popup_image_style_options in Magnific Popup 7
Utility function returning all available image styles.
Return value
array An associative array of image style names (keys) and labels (values).
1 call to _magnific_popup_image_style_options()
- magnific_popup_field_formatter_settings_form in includes/
magnific_popup.formatters.inc - Implements hook_field_formatter_settings_form().
File
- includes/
magnific_popup.formatters.inc, line 371 - Formatters for Magnific Popup.
Code
function _magnific_popup_image_style_options() {
$image_styles = array();
$all_styles = image_styles();
foreach ($all_styles as $style) {
if (!empty($style['name']) && !empty($style['label'])) {
$image_styles[$style['name']] = $style['label'];
}
}
return $image_styles;
}