function opigno_add_image_filters in Opigno 7
2 calls to opigno_add_image_filters()
- opigno_install in ./
opigno.install - Implements hook_install().
- opigno_update_7102 in ./
opigno.install - Enable the course image field Add two new image styles for courses/classes
File
- ./
opigno.install, line 385 - Contains install instructions and logic
Code
function opigno_add_image_filters() {
// Add image style for courses main page
$style = image_style_save(array(
'name' => 'course_intro_image',
'label' => 'Course intro image (1200)',
));
$effect = array(
'name' => 'image_scale',
'data' => array(
'width' => 1200,
'height' => null,
'upscale' => false,
),
'isid' => $style['isid'],
);
image_effect_save($effect);
// Add image style for courses main page
$style = image_style_save(array(
'name' => 'course_thumbnail_image',
'label' => 'Course thumbnail image (400x300)',
));
$effect = array(
'name' => 'image_scale_and_crop',
'data' => array(
'width' => 400,
'height' => 300,
),
'isid' => $style['isid'],
);
image_effect_save($effect);
}