Hello. I have a question regarding BuddyPress Moderation Tools.
I noticed the default for button is ‘Report’, but looking at the code, I want to change the text to “R” or “F” without breaking the plugin.
Once you can point me out what line of code I can change (without breaking the plugin), I’ll structure a button html and then assign the link in it through a tag to show a flag icon.
Just trying to minimize the business on the eyes (lots of ‘Reports’) in Activities, so it would be nice to minimize its presence.
Not sure what you mean.
If the code looked like this
$custom_field_value .= '<div class="file"><a href="'.$custom_field_single_value.'" target="_blank">'.$custom_field_single_value.'</a></div>';
I would have changed up the code to show the back ground text as an image like this
$custom_field_value .= '<div class="file"><a href="'.$custom_field_single_value.'" target="_blank"><img src="'. get_template_directory_uri().'/flag.png" />'.$custom_field_single_value->src.'</a></div>';
So, I was hoping you could direct me on where I would change up code to show a small icon flag without breaking the plugin 🙂 Or, what lines I can safely alter the text from “Report” to “R” 🙂
Thanks in advance.
Hello, quick question:
On line 52 in bpmts-template.php I changed Report to Flag
$label = $args['label'] ? esc_html( $args['label'] ) : __( 'Report', 'buddypress-moderation-tools' );
Now it looks like this
$label = $args['label'] ? esc_html( $args['label'] ) : __( 'Flag', 'buddypress-moderation-tools' );
Plugin seems to still work.
Is this okay?
I’m trying to minimize the button’s presence on activities.
This will work fine but may I know why do you prefer this method over translation.
Translation will allow you to keep the changes in future while with this method, It will be lost in next upgrade.
PS:- If needed, I can help with how you can translate.
Translations allows you to translate the text from one language to another(localization). It is normally used to translate a software written one language to make it usable for other language users.
or you can simply install POEdit and try opening the .po file there and translate. Once, It is translated, save the generated file as the name-en_US.mo(depending on plugin name/your current locale) and WordPress will pick it.
You can later move the translaton to wp-content/languages/plugins/ directory.
You must be logged in to reply to this topic.