Changeset 3757 for trunk/bp-messages/bp-messages-notifications.php
- Timestamp:
- 01/20/2011 10:53:49 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-messages/bp-messages-notifications.php
r3592 r3757 3 3 function messages_notification_new_message( $args ) { 4 4 global $bp; 5 5 6 extract($args); 6 7 7 $sender_name = bp_core_get_user_displayname( $sender_id ); 8 $email_subject = $email_content = $args = ''; 9 $sender_name = bp_core_get_user_displayname( $sender_id ); 8 10 9 11 foreach( $recipients as $recipient ) { 10 if ( $sender_id == $recipient->user_id || 'no' == get_user_meta( $recipient->user_id, 'notification_messages_new_message', true ) ) continue; 12 if ( $sender_id == $recipient->user_id || 'no' == get_user_meta( $recipient->user_id, 'notification_messages_new_message', true ) ) 13 continue; 11 14 12 $ud = get_userdata( $recipient->user_id ); 13 $message_link = bp_core_get_user_domain( $recipient->user_id ) . BP_MESSAGES_SLUG .'/'; 15 // User data and links 16 $ud = get_userdata( $recipient->user_id ); 17 $message_link = bp_core_get_user_domain( $recipient->user_id ) . BP_MESSAGES_SLUG .'/'; 14 18 $settings_link = bp_core_get_user_domain( $recipient->user_id ) . BP_SETTINGS_SLUG . '/notifications/'; 15 19 16 $sender_name = stripslashes( $sender_name ); 17 $subject = stripslashes( wp_filter_kses( $subject ) ); 18 $content = stripslashes( wp_filter_kses( $content ) ); 20 // Sender info 21 $sender_name = stripslashes( $sender_name ); 22 $subject = stripslashes( wp_filter_kses( $subject ) ); 23 $content = stripslashes( wp_filter_kses( $content ) ); 19 24 20 25 // Set up and send the message … … 37 42 $email_content .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link ); 38 43 39 / * Send the message */44 // Send the message 40 45 $email_to = apply_filters( 'messages_notification_new_message_to', $email_to ); 41 46 $email_subject = apply_filters( 'messages_notification_new_message_subject', $email_subject, $sender_name );
Note: See TracChangeset
for help on using the changeset viewer.