Created
February 25, 2013 15:16
-
-
Save mrconnerton/5030488 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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