function mediafront_preview_field_form in MediaFront 7.2
Returns the preview image field form.
1 call to mediafront_preview_field_form()
- mediafront_field_form in ./
mediafront.module - Returns the mediafront field form.
File
- ./
mediafront.module, line 492
Code
function mediafront_preview_field_form($preview_default = 'mediafront_original', $thumb_default = 'mediafront_original') {
$form = array();
// Get all of the image styles.
$styles = image_styles();
$options = array();
$options[0] = t('None');
$options['mediafront_original'] = t('Original Image');
foreach ($styles as $name => $style) {
$options[$name] = $style['name'];
}
// Add the preview style selection.
$form['preview'] = array(
'#type' => 'select',
'#title' => t('Preview Style'),
'#description' => t('Select the Image Style to be used when this field is loaded as a preview in a MediaFront player.'),
'#options' => $options,
'#default_value' => $preview_default,
);
// Add the thumbnail style selection.
$form['thumbnail'] = array(
'#type' => 'select',
'#title' => t('Playlist Style'),
'#description' => t('Select the Image Style to be used when this field is used as a thumbnail in a MediaFront playlist.'),
'#options' => $options,
'#default_value' => $thumb_default,
);
return $form;
}