Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: [Resolved] How can I change the text ”Visit Blog” to somthing other like ”Visit Post” or ”Watch News


aces
Participant

@aces

I think I may have just found a way – I saved the following as a plugin myself and it works. So If you change the Case text for your own it may help – I run single site so i can’t try it out…
`<?php
/*
Plugin Name: Text Mangle
Original Author URI: http://quirm.net/
Description: Replacing buddypress texts the eshop plugin way.
Based on PJW Translation Mangler by Peter Westwood http://blog.ftwr.co.uk/
Originally cut and pasted from: http://quirm.net/wiki/eshop/changing-displayed-text/
Author: Rich Pedley
Version: 0.01
*/
class buddypress_Translation_Mangler {
/*
* Filter the translation string before it is displayed.
*/
function filter_gettext($translation, $text, $domain) {
$translations = &get_translations_for_domain( ‘buddypress’ );
switch($text){
case “Who’s Online Avatars”:
return $translations->translate( “Who’s Online…” );
break;
}
return $translation;
}
}
add_filter(‘gettext’, array(‘buddypress_Translation_Mangler’, ‘filter_gettext’), 10, 4);
?>`
I would like to know if there’s anything wrong with using this technique in buddypress?

Skip to toolbar