Commit 4c6efdad authored by vijaycs85's avatar vijaycs85 Committed by frjo
Browse files

Issue #2580387 by vijaycs85: Make _colorbox_doheader() more accessible

parent 3f6b2640
......@@ -56,8 +56,8 @@ function colorbox_theme() {
*/
function colorbox_init() {
// Do not load colorbox during the Drupal installation process, e.g. if part
// of installation profiles.
if (!drupal_installation_attempted()) {
// of installation profiles. Only add the JavaScript and CSS on specified paths.
if (!drupal_installation_attempted() && _colorbox_active()) {
_colorbox_doheader();
}
}
......@@ -166,9 +166,6 @@ function _colorbox_doheader() {
if ($already_added) {
return; // Don't add the JavaScript and CSS multiple times.
}
if (!_colorbox_active()) {
return; // Don't add the JavaScript and CSS on specified paths.
}
// Insert options and translated strings as javascript settings.
if (variable_get('colorbox_custom_settings_activate', 0)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment