Skip to:
Content
Pages
Categories
Search
Top
Bottom

Disabling @mentions

  • Avatar of ultimateuser
    ultimateuser
    Participant

    @ultimateuser

    Hi,

    I’m using WP 3.6 and BP 1.8

    I’ve added add_filter('bp_activity_do_mentions', '__return_false');

    to my bp-custom.php file.

    However when I visit a Members Profile Page the @mention still displays below the name field.

    Any suggestions?

    Thank you

Viewing 10 replies - 1 through 10 (of 10 total)
  • Avatar of ultimateuser
    ultimateuser
    Participant

    @ultimateuser

    I’ve read this on: http://buddypress.org/2013/06/buddypress-1-8-beta1-is-now-available/

    But it doesn’t work for me, can anyone help?

    Avatar of dcavins
    dcavins
    Participant

    @dcavins

    You can use r-a-y’s code to remove that pane:

    //Removes mentions pane from profile activity (doesn't remove mention functionality)
    function ray_remove_mention_nav() {
    global $bp;
    bp_core_remove_subnav_item( $bp->activity->slug, 'mentions' );
    }
    add_action( 'bp_setup_nav', 'ray_remove_mention_nav', 15 );

    It works on my 1.8+ test setup.

    -David

    Avatar of ultimateuser
    ultimateuser
    Participant

    @ultimateuser

    Thanks will try that!

    Avatar of ultimateuser
    ultimateuser
    Participant

    @ultimateuser

    I still don’t understand why adding:

    add_filter( ‘bp_activity_do_mentions’, ‘__return_false’ );

    to bp-custom.php or functions.php doesn’t work.

    This should complete disable mentions.

    Anyone knows why this doesn’t work?

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    It does work! I’ve just tested it for you and run from functions.php.

    Avatar of ultimateuser
    ultimateuser
    Participant

    @ultimateuser

    @hnla I have put the code in my functions.php of my Child Theme. Mentions are still enabled. Is there anything else I can try?

    Avatar of ultimateuser
    ultimateuser
    Participant

    @ultimateuser

    It seems to work partly:

    For example on a Members page it removed the Mentions tab. But I can still click ‘Public Message’ and use the mention function.

    Avatar of ultimateuser
    ultimateuser
    Participant

    @ultimateuser

    I’ve got it working on the default BP theme my adding the code to functions.php

    It is however still not working on my child-theme.

    Avatar of Lukas Toth
    Lukáš Tóth
    Participant

    @tothlukas4

    It’s working on my child-theme but I found that in your code aren’t apostropes…
    try this one instead
    add_filter( ‘bp_activity_do_mentions’, ‘__return_false’ );

    Avatar of sundev
    sundev
    Participant

    @sundev

    @ultimateuser

    create bp-custom.php and place it in wp-content/plugins, not wp-content/plugins/buddypress.

    copy directly and paste the code below into bp-custom.php you created.

    <?php
    add_filter( ‘bp_activity_do_mentions’, ‘__return_false’ );
    ?>

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

You must be logged in to reply to this topic.