Index: dhtml_menu.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/dhtml_menu/dhtml_menu.module,v
retrieving revision 1.29.2.19
diff -u -F^f -r1.29.2.19 dhtml_menu.module
--- dhtml_menu.module	5 Jun 2009 00:09:25 -0000	1.29.2.19
+++ dhtml_menu.module	31 Jul 2009 12:41:24 -0000
@@ -34,15 +34,17 @@ function dhtml_menu_theme_registry_alter
 
   // Back up the existing theme functions.
   $themes = variable_get('dhtml_menu_theme', array());
-  $themes[$theme] = array(
-    'menu_item' => $theme_registry['menu_item']['function'],
-    'menu_item_link' => $theme_registry['menu_item_link']['function'],
-  );
+  unset($themes[$theme]);
+  foreach (array('menu_item','menu_item_link') as $hook) {
+    $intercept = 'function';
+    if ($theme_registry[$hook]['function'] == 'devel_themer_catch_function') {
+      $intercept = 'devel_function_intercept';
+    }
+    $themes[$theme][$hook] = $theme_registry[$hook][$intercept];
+    // Replace them with our own. These will "preprocess" and call the real functions.
+    $theme_registry[$hook][$intercept] = 'dhtml_menu_theme_' . $hook;
+  }
   variable_set('dhtml_menu_theme', $themes);
-
-  // Replace them with our own. These will "preprocess" and call the real functions.
-  $theme_registry['menu_item']['function'] = 'dhtml_menu_theme_menu_item';
-  $theme_registry['menu_item_link']['function'] = 'dhtml_menu_theme_menu_item_link';
 }
 
 /**
