Changeset 5729 for trunk/bp-messages/bp-messages-functions.php
- Timestamp:
- 02/11/2012 09:32:04 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-messages/bp-messages-functions.php
r5696 r5729 90 90 91 91 // Strip the sender from the recipient list if they exist 92 if ( $key = array_search( $sender_id, (array) $recipient_ids ) )92 if ( $key = array_search( $sender_id, (array) $recipient_ids ) ) 93 93 unset( $recipient_ids[$key] ); 94 94 95 95 // Remove duplicates 96 $recipient_ids = array_unique( (array) $recipient_ids );96 $recipient_ids = array_unique( (array) $recipient_ids ); 97 97 98 98 if ( empty( $recipient_ids ) ) … … 100 100 101 101 // Format this to match existing recipients 102 foreach( (array) $recipient_ids as $i => $recipient_id ) {102 foreach( (array) $recipient_ids as $i => $recipient_id ) { 103 103 $message->recipients[$i] = new stdClass; 104 104 $message->recipients[$i]->user_id = $recipient_id; … … 109 109 110 110 // Send screen notifications to the recipients 111 foreach ( (array) $message->recipients as $recipient )111 foreach ( (array) $message->recipients as $recipient ) 112 112 bp_core_add_notification( $message->id, $recipient->user_id, 'messages', 'new_message' ); 113 113 … … 234 234 235 235 if ( (int) $total_items > 1 ) { 236 $text = sprintf( __('You have %d new messages', 'buddypress' ), (int) $total_items );236 $text = sprintf( __('You have %d new messages', 'buddypress' ), (int) $total_items ); 237 237 $filter = 'bp_messages_multiple_new_message_notification'; 238 238 } else { 239 $text = sprintf( __('You have %d new message', 'buddypress' ), (int) $total_items );239 $text = sprintf( __('You have %d new message', 'buddypress' ), (int) $total_items ); 240 240 $filter = 'bp_messages_single_new_message_notification'; 241 241 } … … 243 243 244 244 if ( 'string' == $format ) { 245 $return = apply_filters( $filter, '<a href="' . $link . '" title="' . $title . '">' . $text . '</a>', (int) $total_items, $text, $link );245 $return = apply_filters( $filter, '<a href="' . $link . '" title="' . $title . '">' . $text . '</a>', (int) $total_items, $text, $link ); 246 246 } else { 247 247 $return = apply_filters( $filter, array(
Note: See TracChangeset
for help on using the changeset viewer.