comment_invoke_comment

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/comment/comment.module, строка 1984

Версии
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.

Возвращаемое значение

Значение, которое возвращает вызванный хук.

▾ 6 функции вызывают comment_invoke_comment()

comment_admin_overview_submit in modules/comment/comment.module
Execute the chosen 'Update option' on the selected comments, such as publishing, unpublishing or deleting.
comment_form in modules/comment/comment.module
comment_save in modules/comment/comment.module
Сохраняет новый или измененный комментарий.
comment_validate in modules/comment/comment.module
Проверка данных комментария.
theme_comment_view in modules/comment/comment.module
_comment_delete_thread in modules/comment/comment.module

Код

<?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;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему