You are here

function _shadowbox_construct_header in Shadowbox 7.3

Same name and namespace in other branches
  1. 7.4 shadowbox.module \_shadowbox_construct_header()

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

1 call to _shadowbox_construct_header()
shadowbox_init in ./shadowbox.module
Implements hook_init().

File

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

Code

function _shadowbox_construct_header() {
  $shadowbox_enabled = variable_get('shadowbox_enabled', TRUE);
  $shadowbox_auto = variable_get('shadowbox_auto_enable_all_images', 0);
  $shadowbox_enable_globally = variable_get('shadowbox_enable_globally', TRUE);

  // Add shadowbox library files.
  if ($shadowbox_enabled && ($shadowbox_auto || $shadowbox_enable_globally) && _shadowbox_activation()) {

    // Add the base files.
    drupal_add_library('shadowbox', 'shadowbox');
  }
}