Created
April 20, 2011 14:10
-
-
Save zachseifts/931422 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Build the Shadowbox header by adding the necessary CSS and JS files. | |
*/ | |
function shadowbox_construct_header() { | |
global $language; | |
if (shadowbox_active() && variable_get('shadowbox_enabled', TRUE)) { | |
// Add the base files. | |
shadowbox_library_add_js('shadowbox.js'); | |
shadowbox_library_add_css('shadowbox.css'); | |
$shadowbox_location = variable_get('shadowbox_location', SHADOWBOX_DEFAULT_PATH); | |
// Print the JavaScript settings to the page. | |
drupal_add_js(shadowbox_get_settings(), 'setting'); | |
// Add the automatic image handling. | |
shadowbox_add_js('shadowbox_auto.js'); | |
// Initialize Shadowbox. | |
drupal_add_js(' | |
Shadowbox.path = "' . base_path() . $shadowbox_location . '/"; | |
Shadowbox.init(Drupal.settings.shadowbox); | |
', 'inline', 'footer'); | |
shadowbox_add_css('shadowbox.css'); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment