• Resolved daymobrew

    (@daymobrew)


    I am trying to change the title of the Blog Subscription widget as the site visitors may be confused by the use of ‘blog’

    I am using the ‘gettext’ filter. It work for strings in the twentyeleven and multiple other plugins but not Jetpack.

    function cetns_filter_gettext($translation, $text, $domain) {
       if ($domain == 'jetpack') {
         $translations = &get_translations_for_domain('jetpack');
         switch($text) {
           case 'Subscribe to Blog via Email': // jetpack/modules/subscriptions.php
    echo "<!-- CETNS_FILTER_GETTEXT: /$translation/$text/$domain/ -->\n";
             return $translations->translate( 'Subscribe to web site updates' );
             //return 'Subscribe to web site updates'; // Tried this - doesn't work.
             break;
         }
       }
    
      return $translation;
    }
    add_filter('gettext', 'cetns_filter_gettext', 10, 3);

    The debug string is being output but the changed string is not displayed on the site. Am I doing something wrong?

    http://wordpress.org/plugins/jetpack/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Trying to change text via gettext filter but not working’ is closed to new replies.