Skip to content

Instantly share code, notes, and snippets.

@mrconnerton
Created February 25, 2013 15:16
Show Gist options
  • Save mrconnerton/5030488 to your computer and use it in GitHub Desktop.
Save mrconnerton/5030488 to your computer and use it in GitHub Desktop.
<?php
function module_invoke() {
$args = func_get_args();
$module = $args[0];
$hook = $args[1];
unset($args[0], $args[1]);
$function = $module . '_' . $hook;
if (module_hook($module, $hook)) {
// debug here
if($hook == 'update_index') watchdog("debug", $function);
return call_user_func_array($function, $args);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment