BP_Groups_Template::groups()

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


Description Description

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

See also See also


Top ↑

Return Return

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


Top ↑

Source Source

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

	function groups() {
		if ( $this->current_group + 1 < $this->group_count ) {
			return true;
		} elseif ( $this->current_group + 1 == $this->group_count ) {

			/**
			 * Fires right before the rewinding of groups list.
			 *
			 * @since 1.5.0
			 */
			do_action('group_loop_end');
			// Do some cleaning up after the loop.
			$this->rewind_groups();
		}

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

Top ↑

Changelog Changelog

Changelog
Version Description
1.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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