You are here

function term_merge_duplicate_suggestion_name_hash in Term Merge 7

Hash term based on its name.

1 string reference to 'term_merge_duplicate_suggestion_name_hash'
name.inc in plugins/duplicate_suggestion/name.inc

File

plugins/duplicate_suggestion/name.inc, line 18

Code

function term_merge_duplicate_suggestion_name_hash($term) {

  // Making upper case.
  $name = drupal_strtoupper($term->name);

  // Trying transliteration, if available.
  if (module_exists('transliteration')) {
    $name = transliteration_get($name);

    // Keeping only ASCII chars.
    $name = preg_replace('#\\W#', '', $name);
  }
  return $name;
}