BP_Activity_Template::user_activities()

Whether there are activity items left in the loop to iterate over.


Description Description

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

See also See also


Top ↑

Return Return

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


Top ↑

Source Source

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

	public function user_activities() {
		if ( ( $this->current_activity + 1 ) < $this->activity_count ) {
			return true;
		} elseif ( ( $this->current_activity + 1 ) == $this->activity_count ) {

			/**
			 * Fires right before the rewinding of activity posts.
			 *
			 * @since 1.1.0
			 */
			do_action( 'activity_loop_end' );

			// Do some cleaning up after the loop.
			$this->rewind_activities();
		}

		$this->in_the_loop = false;

		return false;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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