Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: How to replace a core function

@shanebp

Moderator

Congrats on the solution.
However, rather that recreate $recipients, you should be able to do a simple string operation on it. Something like:

function manu_bp_message_thread_to( $recipients ) {
    $my_link = bp_core_get_userlink( bp_loggedin_user_id() ) . ',';
    $recipients = str_replace($my_link, '', $recipients);
    return $recipients;
}
add_filter('bp_message_thread_to', 'manu_bp_message_thread_to', 20, 1);
Skip to toolbar