function privatemsg_invoke_privatemsg in Privatemsg 5.3
Same name and namespace in other branches
- 5 privatemsg.module \privatemsg_invoke_privatemsg()
Invoke a hook_privatemsg() operation in all modules.
Parameters
&$message: A message object.
$op: A string containing the name of the message operation.
Return value
The returned value of the invoked hooks.
5 calls to privatemsg_invoke_privatemsg()
File
- ./
privatemsg.module, line 2447
Code
function privatemsg_invoke_privatemsg(&$message, $op) {
$return = array();
foreach (module_implements('privatemsg') as $name) {
$function = $name . '_privatemsg';
$result = $function($message, $op);
if (isset($result) && is_array($result)) {
$return = array_merge($return, $result);
}
else {
if (isset($result)) {
$return[] = $result;
}
}
}
return $return;
}