Changeset 11800 for trunk/src/bp-messages/bp-messages-notifications.php
- Timestamp:
- 01/05/2018 04:32:57 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/bp-messages-notifications.php
r11606 r11800 205 205 206 206 /** 207 * Mark new message notification as read when the corresponding message is mark read. 208 * 209 * This callback covers mark-as-read bulk actions. 210 * 211 * @since 3.0.0 212 * 213 * @param int $thread_id ID of the thread being marked as read. 214 */ 215 function bp_messages_mark_notification_on_mark_thread( $thread_id ) { 216 $thread_messages = BP_Messages_Thread::get_messages( $thread_id ); 217 218 foreach ( $thread_messages as $thread_message ) { 219 bp_notifications_mark_notifications_by_item_id( bp_loggedin_user_id(), $thread_message->id, buddypress()->messages->id, 'new_message' ); 220 } 221 } 222 add_action( 'messages_thread_mark_as_read', 'bp_messages_mark_notification_on_mark_thread' ); 223 224 /** 207 225 * When a message is deleted, delete corresponding notifications. 208 226 *
Note: See TracChangeset
for help on using the changeset viewer.