You are here

function lingotek_comment_update in Lingotek Translation 7.3

Same name and namespace in other branches
  1. 7.2 lingotek.module \lingotek_comment_update()
  2. 7.4 lingotek.module \lingotek_comment_update()

Implements hook_comment_update().

1 call to lingotek_comment_update()
lingotek_comment_insert in ./lingotek.module
Implements hook_comment_insert().

File

./lingotek.module, line 1171

Code

function lingotek_comment_update($comment) {
  if (LingotekComment::$content_update_in_progress) {
    return;
  }
  $target_types = variable_get('lingotek_translate_comments_node_types', array());
  $comment_node = lingotek_node_load_default($comment->nid);
  $valid_translation_target = !empty($comment_node->type) && isset($target_types[$comment_node->type]);
  if (class_exists('LingotekComment') && variable_get('lingotek_translate_comments', FALSE) && $valid_translation_target) {
    $lingotek_comment = LingotekComment::load($comment)
      ->contentUpdated();
  }
}