Skip to:
Content
Pages
Categories
Search
Top
Bottom

Marking users in activity using the “@” tag


  • Raval
    Participant

    @ravals

    Hello all
    WordPress 5.1.1
    with the BuddyBoss theme
    and BuddyPress 4.2.0

    I am asking for support. When I enter @ in the stream of activity window to mark someone, a list of users appears as a suggestion. How can you turn it off? The list shows user logins, and I want logins to be kept secret. Is the way to disable the hint to the user or hide the login and replace it with a pseudonym?

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

  • Venutius
    Moderator

    @venutius

    I think there’s some code you could add to your site you make sure no users get listed. Are you using BP Legacy or BP Nouveau ( Settings>>BuddyPress>>Options )?


    Raval
    Participant

    @ravals

    Hi @Venutius. Thank you for your response.
    I use BP Legacy


    Venutius
    Moderator

    @venutius

    Hi there,

    There’s two aspects to this. Firstly the inital list that gets displayed is based on the users friends list and it’s prepopulated on page load. To remove this you can add the following to your functions.php:

    remove_action( 'bp_activity_mentions_prime_results', 'bp_friends_prime_mentions_results' );

    Secondly when a user types @xx there is a lookup for mentions suggestions against bp_core_get_suggestions if you return an empty array then no mention names will be displayed. Note that as it stands this will remove all mentions suggestions, so not just in activity but also in messaging etc. if you want to be more specific you will need to add a conditional which returns an empty array for only thse pages where you want that behaviour.

    add_filter( 'bp_core_get_suggestions', 'bpex_filter_suggestions', 10, 2 );
    
    function bpex_filter_suggestions( $retval, $args ) {
    	
        return array();
    
    }

    Raval
    Participant

    @ravals

    @Venutius Thank you for your help. I use the first code and work the way I need it. Thank you very much

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar