Created
June 16, 2015 23:26
-
-
Save elimn/c0cab71da29472edb521 to your computer and use it in GitHub Desktop.
MT | TEC | For churches and such, removes "kick ass" from strings
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 | |
| /* | |
| * SWAPS OUT USAGES OF "KICK ASS" WITH A DIFFERENT WORD | |
| * 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'... | |
| */ | |
| function tribe_kick_ass_eraser ( $translations, $text, $domain ) { | |
| // This is what we will replace "kick ass" with | |
| $replacement_text = 'excel'; | |
| if( is_admin() && strpos($domain, 'tribe-') === 0 ) { | |
| $text = str_ireplace('kick ass', $replacement_text, $text); | |
| } | |
| return $text; | |
| } | |
| add_filter('gettext', 'tribe_kick_ass_eraser', 20, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment