You are here

function panopoly_images_init in Panopoly 7

Implementation of hook_init()

File

modules/panopoly/panopoly_images/panopoly_images.module, line 8

Code

function panopoly_images_init() {

  // Adding the panopoly images file to the theme so it will show up in the WYSIWYG
  drupal_add_css(drupal_get_path('module', 'panopoly_images') . '/panopoly-images.css', array(
    'group' => CSS_THEME,
  ));
  $images_loaded = libraries_load('jquery.imagesloaded');
  if (empty($images_loaded['loaded'])) {
    watchdog('panopoly-images', 'Panopoly Images could not find the jquery.imagesloaded library. This should get loaded by the Manual Crop module', array(), WATCHDOG_ERROR);
  }
  else {
    drupal_add_js(drupal_get_path('module', 'panopoly_images') . '/panopoly-images.js', array(
      'type' => 'file',
      'group' => JS_DEFAULT,
      'every_page' => TRUE,
    ));
  }
}