bp_message_thread_has_unread()

Check whether the current thread has unread items.


Description Description


Return Return

(bool) True if there are unread items, otherwise false.


Top ↑

Source Source

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

function bp_message_thread_has_unread() {
	global $messages_template;

	$retval = ! empty( $messages_template->thread->unread_count )
		? true
		: false;

	/**
	 * Filters whether or not a message thread has unread items.
	 *
	 * @since 2.1.0
	 *
	 * @param bool $retval Whether or not a message thread has unread items.
	 */
	return apply_filters( 'bp_message_thread_has_unread', $retval );
}

Top ↑

User Contributed Notes User Contributed Notes

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