Created
August 18, 2016 22:12
-
-
Save GeoffEW/7cc7b891bcd6f9612d610ec295a30e4d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Put your custom text here in a key => value pair | |
// Example: 'Text you want to change' => 'This is what it will be changed to' | |
// The text you want to change is the key, and it is case-sensitive | |
// The text you want to change it to is the value | |
// You can freely add or remove key => values, but make sure to separate them with a comma | |
// This example changes the label "Venue" to "Location", and "Related Events" to "Similar Events" | |
$custom_text = array( | |
'Events' => 'Bananas', | |
'Event' => 'Banana', | |
); | |
// If this text domain starts with "tribe-" or "the-events-", and we have replacement text | |
if((strpos($domain, 'tribe-') === 0 || strpos($domain, 'the-events-') === 0 || strpos($domain, 'event-') === 0) && array_key_exists($text, $custom_text) ) { | |
$text = $custom_text[$text]; | |
} | |
return $text; | |
} | |
add_filter('gettext', 'tribe_custom_theme_text', 20, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment