You are here

function _opigno_lms_install_enable_image_styles in Opigno LMS 7

Helper function to enable Image styles.

1 call to _opigno_lms_install_enable_image_styles()
opigno_lms_install in ./opigno_lms.install
Implements hook_install().

File

./opigno_lms.install, line 95
Install, update and uninstall functions for the Opigno LMS installation profile.

Code

function _opigno_lms_install_enable_image_styles() {

  // Add image style for user thumbnail
  $style = image_style_save(array(
    'name' => 'user_thumbnail',
  ));
  $effect = array(
    'name' => 'image_scale_and_crop',
    'data' => array(
      'width' => 255,
      'height' => 255,
    ),
    'isid' => $style['isid'],
  );
  image_effect_save($effect);
}