BP_Notifications_Template::notifications()

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


Description 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 See also


Top ↑

Return Return

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


Top ↑

Source 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 1.9.0
			 */
			do_action( 'notifications_loop_end');

			$this->rewind_notifications();
		}

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


Top ↑

Changelog Changelog

Changelog
Version Description
1.9.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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