Skip to:
Content
Pages
Categories
Search
Top
Bottom

Remove Message Notification

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

  • Venutius
    Moderator

    @venutius

    Hi there Josh,

    Just tested this and it still works.


    joshthebeloved
    Participant

    @joshthebeloved

    Really? It must be a theme issue then?

    Thanks


    joshthebeloved
    Participant

    @joshthebeloved

    Could you give me advice on another thing, is there a way to disable members from sending messages to more that one person at a time?

    Thanks @Venutius!

    -Joshua


    Venutius
    Moderator

    @venutius

    You can use something like this:

    function venutius_check_recipients( $message_info ) {
    	$recipients = $message_info->recipients;
    
    	if ( count( $recipients ) > 1 && ! current_user_can( 'manage_options' ) ) {
    		unset( $message_info->recipients );
    	}
    
    }
    
    add_action( 'messages_message_before_save', 'venutius_check_recipients' );

    This will reject any message with more than 1 recipient, except admin.


    joshthebeloved
    Participant

    @joshthebeloved

    Hi again,

    Just in case it will be of help to anyone else, I was finally able to remove the message “notification” using this code.

    add_action( 'after_setup_theme', function () {
        remove_action( 'messages_message_sent', 'bp_messages_message_sent_add_notification', 10 );
    }, 999 );

    I’m not sure why the other one didn’t work for me. (I’m using Boss theme). Support was kind enough to provide me this fix.

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