23 Jun
2008
23 Jun
'08
2:53 p.m.
$foo = module_invoke('module_name', 'api_function', $bar);
...without module_exists() is sufficient. module_invoke() invokes module_hook(), which in turn checks for function_exists(). Also, module_invoke() is not limited to Drupal hooks / API callbacks. If the returned results of call_user_func_array() work for your particular implementation, this is the best approach for each module that wants to integrate with another, optionally installed module in contrib. @see http://api.drupal.org/api/function/module_invoke/5 @see http://api.drupal.org/api/function/module_hook/5 Daniel