You are here

function photos_init in Album Photos 7.3

Same name and namespace in other branches
  1. 6.2 photos.module \photos_init()

Implements hook_init().

File

./photos.module, line 2006
Implementation of photos.module.

Code

function photos_init() {
  drupal_add_js(drupal_get_path('module', 'photos') . '/js/min/photos.min.js');
  $library = 'nope';
  if (module_exists('libraries')) {
    if (($library = libraries_load('jeditable')) && !empty($library['loaded'])) {
      drupal_add_js(drupal_get_path('module', 'photos') . '/js/min/photos_jeditable.min.js');
    }
  }
  drupal_add_js(array(
    'photos' => array(
      'image_edit_token' => drupal_get_token('image_edit_token'),
    ),
  ), 'setting');
  drupal_add_css(drupal_get_path('module', 'photos') . '/css/photos.css');
}