Hi @doremdou
You can disable @-mentions with the BuddyPress No Mentions plugin.
Hello @henrywright thank you for your answer 🙂
I tried the plugin but it only remove mentions tabs, if someone put a “@” before a name it always link to his profile, am I doing someone wrong or the plugin is not working like it should?
someone = something sorry
hi @doremdou,
add this to bp-custom.php
add_filter( 'bp_activity_do_mentions', '__return_false' );
Thank you @danbp for your answer.
I don’t know why but even with your code in bp-custom.php user link to profile are still there on old and new @mentions
Could it be a plugin “conflict”?
Could it be a plugin “conflict”?
I don’t think, but it’s possible. To know the answer, check it out, you’re the master on your site !
Have you tested by writing a notice where you mentionned a member ?
The snippet removes only the link from @mention, but doesn’t remove or sanitize this part. If somebody writes @ something, you’ll see @ something but without the link to profile.
And for almost any activity modification, the code isn’t retroactive. Past activities are stored with the old version and the new one are stored with your modification.
@doremdou the code @danbp provided should stop @-names being ‘linkified’. The function that ‘linkifies’ @-names begins like this:
function bp_activity_at_name_filter( $content, $activity_id = 0 ) {
// Are mentions disabled?
if ( ! bp_activity_do_mentions() ) {
return $content;
}...
As you can see, if bp_activity_do_mentions()
returns false
then $content
is returned unmodified (i.e. @-names aren’t linked).
In your case, you’re making sure the function returns false via add_filter( 'bp_activity_do_mentions', '__return_false' );
So this should be working. There must be something else going on here…
I understand, I will try to disable everything until I see a change
Oh I think I understand, it is working on BP activities but mentions in activities which concerned bbPress forums (topics, replies…) are still linking to profiles.
Should I ask how to fix this in bbPress forums or should the code you gave me above also disable it?
Thank you very much
No the above code doesn’t disable @-mentions in bbpress
You use this filter for bbPress topics:
add_filter( 'bbp_find_mentions', '__return_false' );
Thank youuuuuuuuu @danbp ! 🙂
I didn’t notice that it was not buddypress until now… sorry ^^
thanks again @henrywright & @danbp
have a good day