function layouter_image_style in Layouter - WYSIWYG layout templates 7
Returns image styles for prerendering image.
3 calls to layouter_image_style()
- layouter_img_caption_text_form in includes/
layouter.pages.inc - Returns Form for adding content for two_columns_img_left_text_right layout.
- layouter_img_only_form in includes/
layouter.pages.inc - Returns Form for adding content for img_only layout.
- layouter_text_img_form in includes/
layouter.pages.inc - Returns Form for adding content for two_columns_text_img_left layout.
File
- includes/
layouter.pages.inc, line 319 - File with pages callbacks.
Code
function layouter_image_style() {
if (user_access('administer image styles')) {
$description = 'You can also <a href="@image_styles">' . 'add your own image style</a> if you need to.';
$extra = array(
'@image_styles' => url('admin/config/media/image-styles'),
);
$admin_image_style_description = '<br />' . t('You can also <a href="@image_styles">add your own image style</a> if you need to.', $extra);
}
else {
$admin_image_style_description = '';
}
$image_styles = variable_get('layouter_image_styles', image_styles());
$image_styles_options = array();
$image_styles_options['layouter_none'] = 'none';
foreach ($image_styles as $k => $v) {
if ($v != '0') {
$image_styles_options[$k] = $k;
}
}
return array(
'#type' => 'select',
'#title' => t('Image style'),
'#options' => $image_styles_options,
'#default_value' => 'layouter_none',
'#description' => $admin_image_style_description,
);
}