comment_invoke_comment
modules/comment/comment.module, строка 1957
- Версии
- 5 – 6
comment_invoke_comment(&$comment, $op)
Invoke a hook_comment()
operation in all modules.
Параметры
&$comment
A comment object.
$op
A string containing the name of the comment operation.
Возвращаемое значение
Значение, которое возвращает вызванный хук.
Код
<?php
function comment_invoke_comment(&$comment, $op) {
$return = array();
foreach (module_implements('comment') as $name) {
$function = $name .'_comment';
$result = $function($comment, $op);
if (isset($result) && is_array($result)) {
$return = array_merge($return, $result);
}
else if (isset($result)) {
$return[] = $result;
}
}
return $return;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии