BP_Core_Members_Template::members()

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

Description

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

See also

Return

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

Source

File: bp-members/classes/class-bp-core-members-template.php

274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
function members() {
    if ( $this->current_member + 1 < $this->member_count ) {
        return true;
    } elseif ( $this->current_member + 1 == $this->member_count ) {
 
        /**
         * Fires right before the rewinding of members listing.
         *
         * @since BuddyPress 1.5.0
         */
        do_action('member_loop_end');
        // Do some cleaning up after the loop.
        $this->rewind_members();
    }
 
    $this->in_the_loop = false;
    return false;
}

Changelog

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.