Skip to content

Instantly share code, notes, and snippets.

@mikeyarce
Created July 18, 2016 19:15
Show Gist options
  • Select an option

  • Save mikeyarce/38fdd4efb938cc5f55eb59a4fb7e2611 to your computer and use it in GitHub Desktop.

Select an option

Save mikeyarce/38fdd4efb938cc5f55eb59a4fb7e2611 to your computer and use it in GitHub Desktop.
<?php
// Remove the opening PHP tag above if your file already includes it
add_filter('gettext', 'translate_text');
add_filter('ngettext', 'translate_text');
function translate_text($translated) {
$translated = str_ireplace('Choose an option', 'Select', $translated);
$translated = str_ireplace('Original Text', 'Your Replacment Text', $translated);
return $translated;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment