You are here

function lingotek_node_delete in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 6 lingotek.module \lingotek_node_delete()
  2. 7.2 lingotek.module \lingotek_node_delete()
  3. 7.3 lingotek.module \lingotek_node_delete()
  4. 7.4 lingotek.module \lingotek_node_delete()

Implements hook_node_delete().

File

./lingotek.module, line 2522

Code

function lingotek_node_delete($node) {
  $target_ids = lingotek_get_target_node_ids($node->nid);
  if (!empty($target_ids)) {
    $entity = lingotek_entity_load_single('node', $node->nid);
    if (isset($entity->lingotek['lingotek_nodes_translation_method']) && $entity->lingotek['lingotek_nodes_translation_method'] == 'node') {
      lingotek_delete_target_nodes('node', $target_ids);
    }
  }
}