Skip to:

Killing the @mention function

  • MisterS


    Hello everybody,

    I’am currently trying to hide the @mention function to users of my website. So i’ve put the following code in the “bp-custom.php” file :

    function modify_bp_core_hide_mention_item(){
    global $bp;
    bp_core_remove_subnav_item($bp->bp_nav, $bp->bp_options_nav);

    It seems to work well, the “mention” navigation menu is hidden.

    But i have one problem left. There is still a reference to the mention function on the “notifications settings” page, which asks the user if he wants to have an email sent when someone mention him somewhere with the @mention function.

    I’ve found out that this display is made by the function “bp_activity_screen_notification_settings” in the “bp-activity.php” file, which basically just prints a table and then is added to the “bp_notification_settings” hook :
    add_action( ‘bp_notification_settings’, ‘bp_activity_screen_notification_settings’, 1 );

    So my question is : shall I remove this action and write another function which doesnt display the mentions settings ? or is there any better solution ?

    Oh, i’ve forgot to say that i’m a new buddypress/wp user :)

    Thank you in advance, any help is welcome.

Viewing 3 replies - 1 through 3 (of 3 total)

  • techguy


    Why not just leave it on the notification page? So far, you haven’t removed the functionality. You’ve just removed the navigation to see some of that functionality. So, if someone does the @username they’re going to get a notification unless you disable that also. Plus, not many people are going to look at the notifications page anyway;-)

    To your question, I think you would have to remove the action and write another function that doesn’t display the mentions settings. You’d just need to test what happens when save is clicked and that setting isn’t passed. Maybe you pass it as a hidden variable or something.

    Roger Coathup


    cross linking threads – there’s more on this subject here:

    If anyone has developed a full solution for removing @mention, please let me know



    FYI, I posted a solution in the thread Roger linked to.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Killing the @mention function’ is closed to new replies.
Skip to toolbar