BP_Messages_Box_Template::message_threads()
Whether there are threads left in the loop to iterate over.
Description
This method is used by bp_message_threads() as part of the while loop that controls iteration inside the threads loop, eg: while ( bp_message_threads() ) { …
See also
Return
(bool) True if there are more threads to show, otherwise false.
Source
File: bp-messages/classes/class-bp-messages-box-template.php
function message_threads() {
if ( $this->current_thread + 1 < $this->thread_count ) {
return true;
} elseif ( $this->current_thread + 1 == $this->thread_count ) {
/**
* Fires when at the end of threads to iterate over.
*
* @since BuddyPress 1.5.0
*/
do_action( 'messages_box_loop_end' );
// Do some cleaning up after the loop.
$this->rewind_threads();
}
$this->in_the_loop = false;
return false;
}
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.