transliteration.api.php 592 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * @file
  4. * Documents Transliteration's hooks for api reference.
  5. */
  6. /**
  7. * Alters a file name before transliteration and sanitization.
  8. *
  9. * @param &$filename
  10. * The file name before being parsed by transliteration.
  11. *
  12. * @param $source_langcode
  13. * Optional ISO 639 language code that denotes the language of the input.
  14. *
  15. * @see transliteration_clean_filename()
  16. */
  17. function hook_transliteration_clean_filename_prepare_alter(&$filename, $source_langcode) {
  18. $filename = drupal_strtolower($filename);
  19. $filename = str_ireplace(array('&amp; ', '& '), 'and ', $filename);
  20. }