Advertisement
daymobrew

How to remove "From" text

Nov 12th, 2014
745
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.41 KB | None | 0 0
  1. <?php
  2.  
  3. // Suggested update for:
  4. // https://support.woothemes.com/hc/en-us/articles/202974056-How-to-remove-From-text
  5.  
  6. add_filter('gettext', 'translate_text', 10, 3);
  7. add_filter('ngettext', 'translate_text', 10, 3);
  8.  
  9. function translate_text($translated, $text, $domain) {
  10.   if ('From:' == $translated) {
  11.     return '';  // Return empty string so that 'From:' is not displayed.
  12.   }
  13.   return $translated;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement