You are here

function shadowbox_construct_header in Shadowbox 5

Same name and namespace in other branches
  1. 5.2 shadowbox.module \shadowbox_construct_header()
  2. 6.4 shadowbox.module \shadowbox_construct_header()
  3. 6.2 shadowbox.module \shadowbox_construct_header()
  4. 6.3 shadowbox.module \shadowbox_construct_header()

Build the Shadowbox header by adding the necessary CSS and JS files.

1 call to shadowbox_construct_header()
shadowbox_menu in ./shadowbox.module
Implementation of hook_menu().

File

./shadowbox.module, line 666
Shadowbox, a JavaScript media viewer application for displaying content in a modal dialogue.

Code

function shadowbox_construct_header() {
  $path = drupal_get_path('module', 'shadowbox');
  if (shadowbox_active() && variable_get('shadowbox_enabled', TRUE)) {
    variable_get('shadowbox_css_skin', 'original') == 'light' ? drupal_add_css($path . "/shadowbox/build/css/shadowbox-light.css") : drupal_add_css($path . "/shadowbox/build/css/shadowbox.css");
    drupal_add_js($path . '/shadowbox/build/js/adapter/shadowbox-jquery.js');
    drupal_add_js($path . '/shadowbox/build/js/shadowbox.js');
    drupal_add_js($path . '/shadowbox.js');
    drupal_add_js(shadowbox_get_settings(), 'setting');
  }
}