Skip to:
Content

BuddyPress.org

Ticket #2568: jeffsayre_2568_button.patch

File jeffsayre_2568_button.patch, 797 bytes (added by jeffsayre, 15 years ago)

In bp-messages.php, add a filter to function messages_screen_compose()

  • buddypress/bp-messages.php

     
    177177                                $autocomplete_recipients = explode( ',', $_POST['send-to-input'] );
    178178                                $typed_recipients = explode( ' ', $_POST['send_to_usernames'] );
    179179                                $recipients = array_merge( (array) $autocomplete_recipients, (array) $typed_recipients );
    180 
     180                                $recipients = apply_filters( 'bp_messages_recipients', $recipients );
     181                               
    181182                                /* Send the message */
    182183                                if ( $thread_id = messages_new_message( array( 'recipients' => $recipients, 'subject' => $_POST['subject'], 'content' => $_POST['content'] ) ) ) {
    183184                                        bp_core_add_message( __( 'Message sent successfully!', 'buddypress' ) );