description.inc 486 B

12345678910111213141516171819
  1. <?php
  2. /**
  3. * @file
  4. * Plugin definition for duplicate suggestion based on description.
  5. */
  6. $plugin = array(
  7. 'title' => t('Terms description are the same'),
  8. 'description' => t('Mark terms as duplicates if they have the same description.'),
  9. 'hash callback' => 'term_merge_duplicate_suggestion_description_hash',
  10. );
  11. /**
  12. * Hash term based on its description.
  13. */
  14. function term_merge_duplicate_suggestion_description_hash($term) {
  15. return drupal_strtoupper($term->description);
  16. }