function file_styles_styles_presets in Styles 7
Implements hook_styles_presets().
File
- contrib/
file_styles/ file_styles.module, line 132 - File widget formatter definitions.
Code
function file_styles_styles_presets() {
$presets = array(
'file' => array(
'square_thumbnail' => array(
'default' => array(
'square_thumbnail',
),
),
'thumbnail' => array(
'default' => array(
'thumbnail',
),
),
'large' => array(
'default' => array(
'large',
),
),
'medium' => array(
'default' => array(
'medium',
),
),
'original' => array(
'default' => array(
'original',
),
'image' => array(
'original',
),
),
),
);
foreach (image_styles() as $style_name => $style) {
$presets['file'][$style_name]['image'] = array(
$style_name,
);
}
$presets['image'] = $presets['file'];
foreach (image_styles() as $style_name => $style) {
$presets['file'][$style_name]['video'] = array(
'video_large',
);
}
$presets['file']['square_thumbnail']['video'] = $presets['file']['thumbnail']['video'] = array(
'video_thumbnail',
);
$presets['file']['medium']['video'] = array(
'video_small',
);
$presets['file']['original']['video'] = array(
'video_large',
);
return $presets;
}