You are here

function webform_localization_node_delete in Webform Localization 7

Same name and namespace in other branches
  1. 7.4 webform_localization.module \webform_localization_node_delete()

Implements hook_node_delete().

File

./webform_localization.module, line 302
Webform localization module.

Code

function webform_localization_node_delete($node) {
  if (!in_array($node->type, webform_variable_get('webform_node_types')) || empty($node->webform['components'])) {
    return;
  }
  module_load_include('inc', 'webform_localization', 'includes/webform_localization.i18n');

  // Deletion of webform and emails translatable properties.
  webform_localization_delete_translate_strings($node);

  // Delete webform localization configuration record.
  db_delete('webform_localization')
    ->condition('nid', $node->nid)
    ->execute();
}