changeset 3:5efa741592f9

Add an alter hook to the js list. Makes it possible for a custom module to disable an auto-detected JavaScript in case you just know it won't work right in a popup.
author Franck Deroche <franck@defr.org>
date Fri, 31 Dec 2010 14:02:22 +0100
parents 4215c43e74eb
children 09e998f65556
files popups.module
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/popups.module	Fri Dec 31 13:44:00 2010 +0100
+++ b/popups.module	Fri Dec 31 14:02:22 2010 +0100
@@ -179,6 +179,9 @@
   unset($popup_js['core']['misc/jquery.js']);
   unset($popup_js['core']['misc/drupal.js']);
 
+  // Allow modules to specifically alter the JS used in a popup.
+  drupal_alter('popups_js', $js);
+
   if (module_exists('jquery_update')) {
     foreach (jquery_update_get_replacements() as $type => $replacements) {
       foreach ($replacements as $find => $replace) {