You are here

function media_library_init in Media Library 6

Implementation of hook_init()

File

./media_library.module, line 274
Main Media Library module file.

Code

function media_library_init() {
  global $theme_key;

  // CTools necessary stuff
  ctools_include('modal');
  ctools_include('ajax');
  ctools_modal_add_js();

  // Our own basic js.
  $js = drupal_get_path('module', 'media_library') . '/media_library.js';
  drupal_add_js($js);
  drupal_add_css(drupal_get_path('module', 'media_library') . '/media_library_browse.css');
  drupal_add_js(array(
    'media_library' => array(
      'types' => media_library_get_types(),
      'theme' => $theme_key,
    ),
  ), 'setting');
}