Changeset 7527
- Timestamp:
- 11/08/2013 04:40:26 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-messages/bp-messages-functions.php
r7462 r7527 117 117 118 118 // Send screen notifications to the recipients 119 foreach ( (array) $message->recipients as $recipient ) 120 bp_core_add_notification( $message->id, $recipient->user_id, 'messages', 'new_message' ); 119 foreach ( (array) $message->recipients as $recipient ) { 120 bp_core_add_notification( $message->id, $recipient->user_id, 'messages', 'new_message', $message->sender_id ); 121 } 121 122 122 123 // Send email notifications to the recipients … … 242 243 243 244 if ( (int) $total_items > 1 ) { 244 $text = sprintf( __('You have %d new messages', 'buddypress' ), (int) $total_items );245 $text = sprintf( __('You have %d new messages', 'buddypress' ), (int) $total_items ); 245 246 $filter = 'bp_messages_multiple_new_message_notification'; 246 247 } else { 247 $text = sprintf( __('You have %d new message', 'buddypress' ), (int) $total_items ); 248 if ( !empty( $secondary_item_id ) ) { 249 $text = sprintf( __('You have %d new message from %s', 'buddypress' ), (int) $total_items, bp_core_get_user_displayname( $secondary_item_id ) ); 250 } else { 251 $text = sprintf( __('You have %d new message', 'buddypress' ), (int) $total_items ); 252 } 248 253 $filter = 'bp_messages_single_new_message_notification'; 249 254 }
Note: See TracChangeset
for help on using the changeset viewer.