Guest User

Untitled

a guest
Jun 3rd, 2014
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.97 KB | None | 0 0
  1. // See the codex to learn more about WP text domains:
  2. // http://codex.wordpress.org/Translating_WordPress#Localization_Technology
  3. // Example Tribe domains: 'tribe-events-calendar', 'tribe-events-calendar-pro'...
  4.  
  5. add_filter('gettext', 'theme_filter_text', 10, 3);
  6.  
  7. function theme_filter_text( $translations, $text, $domain ) {
  8.  
  9.     // Copy and modify the following if {} statement to replace multiple blocks of text
  10.     // Match the text you want you want to translate, preferably also match the text domain
  11.     if($text === 'Venue' && $domain === 'tribe-events-calendar') {
  12.  
  13.         // The custom text you want instead
  14.         $text = 'Location';
  15.  
  16.     }
  17.  
  18.     // Copy and modify the following if {} statement to replace multiple blocks of text
  19.     // Match the text you want you want to translate, preferably also match the text domain
  20.     if($text === 'Organizer' && $domain === 'tribe-events-calendar') {
  21.  
  22.         // The custom text you want instead
  23.         $text = 'Person in charge';
  24.  
  25.     }
  26.  
  27.  
  28.     return $text;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment