Changeset 3917 for trunk/bp-messages/bp-messages-functions.php
- Timestamp:
- 01/25/2011 08:58:56 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-messages/bp-messages-functions.php
r3903 r3917 85 85 // Send screen notifications to the recipients 86 86 foreach ( (array)$message->recipients as $recipient ) 87 bp_ users_add_notification( $message->id, $recipient->user_id, 'messages', 'new_message' );87 bp_members_add_notification( $message->id, $recipient->user_id, 'messages', 'new_message' ); 88 88 89 89 // Send email notifications to the recipients … … 193 193 } 194 194 195 /******************************************************************************* 196 * These functions handle the recording, deleting and formatting of activity and 197 * notifications for the user and for this specific component. 198 */ 199 200 function messages_format_notifications( $action, $item_id, $secondary_item_id, $total_items ) { 201 global $bp; 202 203 if ( 'new_message' == $action ) { 204 if ( (int)$total_items > 1 ) 205 return apply_filters( 'bp_messages_multiple_new_message_notification', '<a href="' . $bp->loggedin_user->domain . $bp->messages->slug . '/inbox" title="' . __( 'Inbox', 'buddypress' ) . '">' . sprintf( __('You have %d new messages', 'buddypress' ), (int)$total_items ) . '</a>', $total_items ); 206 else 207 return apply_filters( 'bp_messages_single_new_message_notification', '<a href="' . $bp->loggedin_user->domain . $bp->messages->slug . '/inbox" title="' . __( 'Inbox', 'buddypress' ) . '">' . sprintf( __('You have %d new message', 'buddypress' ), (int)$total_items ) . '</a>', $total_items ); 208 } 209 210 do_action( 'messages_format_notifications', $action, $item_id, $secondary_item_id, $total_items ); 211 212 return false; 213 } 214 195 215 ?>
Note: See TracChangeset
for help on using the changeset viewer.