BP_Groups_Template::groups()
Whether there are groups left in the loop to iterate over.
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
Return
(bool) True if there are more groups to show, otherwise false.
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 BuddyPress 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;
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 1.2.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.