Created
May 21, 2014 13:03
-
-
Save ckpicker/2a6717f5c1a0a322ef33 to your computer and use it in GitHub Desktop.
Events 3.5 // Change 'Upcoming Events' text to "What's On"
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
| // 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 ) { | |
| // Copy and modify the following if {} statement to replace multiple blocks of text | |
| // Match the text you want you want to translate, preferably also match the text domain | |
| if( $domain === 'tribe-events-calendar' ) { | |
| // The custom text you want instead | |
| $text = str_ireplace( "Upcoming Events", "What's On", $text ); | |
| } | |
| return $text; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment