Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // THIS IS NOW A TUTORIAL, LATEST SNIPPET FOUND HERE: https://theeventscalendar.com/knowledgebase/changing-the-word-events-to-something-else/
- // This example replaces "Event" with "Meeting" in all Tribe Plugins text
- // See the codex to learn more about WP text domains:
- // http://codex.wordpress.org/Translating_WordPress#Localization_Technology
- // Example Tribe domains: 'tribe-events-calendar', 'tribe-events-calendar-pro'...
- add_filter('gettext', 'theme_filter_text', 10, 3);
- function theme_filter_text( $translations, $text, $domain ) {
- // If this text domain starts with "tribe-"
- if(strpos($domain, 'tribe-') === 0) {
- // Replace both upper and lower case
- $text = str_replace(
- array('Event', 'event'), // Text to search for
- array('Meeting', 'meeting'), // Text to replace it with
- $text
- );
- }
- return $text;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement