Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Created January 15, 2016 02:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jchristopher/c9b5a8f466158d2454e9 to your computer and use it in GitHub Desktop.
Save jchristopher/c9b5a8f466158d2454e9 to your computer and use it in GitHub Desktop.
Customize SearchWP's lenient accent conversion to only utilize Greek letters
<?php
function my_searchwp_leinent_accents_conversions() {
return array(
// Only convert Greek
'Ά' => 'Α', 'ά' => 'α', 'Έ' => 'Ε', 'έ' => 'ε', 'Ή' => 'Η', 'ή' => 'η', 'Ί' => 'Ι', 'ί' => 'ι', 'Ό' => 'Ο', 'ό' => 'ο', 'Ύ' => 'Υ', 'ύ' => 'υ', 'Ώ' => 'Ω', 'ώ' => 'ω', 'ϊ' => 'ι', 'ϋ' => 'υ', 'Ϊ' => 'ι', 'Ϋ' => 'Υ',
);
}
add_filter( 'searchwp_leinent_accents_conversions', 'my_searchwp_leinent_accents_conversions' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment