Commit f81e6636 authored by frjo's avatar frjo
Browse files

Issue #1781634 by dwieeb: Patch to make hook_colorbox_settings_alter working...

Issue #1781634 by dwieeb: Patch to make hook_colorbox_settings_alter working again, missed to fix this in the D7 port.
parent 84cbe146
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
* @link http://colorpowered.com/colorbox/ Colorbox documentation @endlink * @link http://colorpowered.com/colorbox/ Colorbox documentation @endlink
* for the full list of supported parameters. * for the full list of supported parameters.
* @param $style * @param $style
* The name of the active style plugin. * The name of the active style plugin. If $style is 'none', no Colorbox
* theme will be loaded.
*/ */
function hook_colorbox_settings_alter(&$settings, &$style) { function hook_colorbox_settings_alter(&$settings, &$style) {
// Disable automatic downscaling of images to maxWidth/maxHeight size. // Disable automatic downscaling of images to maxWidth/maxHeight size.
......
...@@ -218,8 +218,7 @@ function _colorbox_doheader() { ...@@ -218,8 +218,7 @@ function _colorbox_doheader() {
// Give other modules the possibility to override Colorbox settings and style. // Give other modules the possibility to override Colorbox settings and style.
$data = &$js_settings; $data = &$js_settings;
$data['__drupal_alter_by_ref'] = array(&$style); drupal_alter('colorbox_settings', $data, $style);
drupal_alter('colorbox_settings', $data);
drupal_add_js(array('colorbox' => $js_settings), array('type' => 'setting', 'scope' => JS_DEFAULT)); drupal_add_js(array('colorbox' => $js_settings), array('type' => 'setting', 'scope' => JS_DEFAULT));
......
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