You are here

function lingotek_lingotek_entity_upload_alter in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.6 lingotek.module \lingotek_lingotek_entity_upload_alter()

Implements hook_lingotek_entity_upload_alter().

File

./lingotek.module, line 2947

Code

function lingotek_lingotek_entity_upload_alter(&$params) {
  $entity = $params['entity'];
  $entity_type = $params['entity_type'];
  $xml = $params['xml'];
  $langcode = $params['langcode'];

  // Pull metatags for translation
  if (module_exists('metatag') && variable_get('lingotek_translate_metatags') && metatag_entity_supports_metatags($entity_type) && !empty($entity->metatags[$langcode])) {
    lingotek_attach_xml($xml, 'metatags', $entity->metatags[$langcode]);
  }
}