bp_messages_mark_notification_on_mark_thread( int $thread_id )

Mark new message notification as read when the corresponding message is mark read.


Description Description

This callback covers mark-as-read bulk actions.


Parameters Parameters

$thread_id

(Required) ID of the thread being marked as read.


Top ↑

Source Source

File: bp-messages/bp-messages-notifications.php

function bp_messages_mark_notification_on_mark_thread( $thread_id ) {
	$thread_messages = BP_Messages_Thread::get_messages( $thread_id );

	foreach ( $thread_messages as $thread_message ) {
		bp_notifications_mark_notifications_by_item_id( bp_loggedin_user_id(), $thread_message->id, buddypress()->messages->id, 'new_message' );
	}
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.