BP_Notifications_Template::notifications()

Whether there are notifications left in the loop to iterate over.

Description

This method is used by bp_notifications() as part of the while loop that controls iteration inside the notifications loop, eg: while ( bp_notifications() ) { …

See also

Return

(bool) True if there are more notifications to show, otherwise false.

Source

File: bp-notifications/classes/class-bp-notifications-template.php

	public function notifications() {

		if ( $this->current_notification + 1 < $this->notification_count ) {
			return true;

		} elseif ( $this->current_notification + 1 == $this->notification_count ) {

			/**
			 * Fires right before the rewinding of notification posts.
			 *
			 * @since BuddyPress 1.9.0
			 */
			do_action( 'notifications_loop_end');

			$this->rewind_notifications();
		}

		$this->in_the_loop = false;
		return false;
	}

Changelog

Changelog
Version Description
BuddyPress 1.9.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.