Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: [Resolved] Change ’wrote a new blog post’ text.


@mercime
Participant

@mercime

For this text string, you can use Westi’s method at http://blog.ftwr.co.uk/archives/2010/01/02/mangling-strings-for-fun-and-profit/

You can add the following code in your theme’s functions.php

`<?php

/* http://blog.ftwr.co.uk/archives/2010/01/02/mangling-strings-for-fun-and-profit/ */

class PJW_Translation_Mangler {

function filter_gettext($translation, $text, $domain) {
$translations = &get_translations_for_domain( $domain );
if ( $text == ‘%s wrote a new blog post: %s’ ) {
return $translations->translate( ‘%s wrote: %s’ );
}
return $translation;
}
}
add_filter(‘gettext’, array(‘PJW_Translation_Mangler’, ‘filter_gettext’), 10, 4);

?>
`

Skip to toolbar