BP_Document_Template::user_documents()

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

Description

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

See also

Return

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

Source

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

	public function user_documents() {
		if ( ( $this->current_document + 1 ) < $this->document_count ) {
			return true;
		} elseif ( ( $this->current_document + 1 ) == $this->document_count ) {

			/**
			 * Fires right before the rewinding of document posts.
			 *
			 * @since BuddyBoss 1.1.0
			 */
			do_action( 'document_loop_end' );

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

		$this->in_the_loop = false;

		return false;
	}

Changelog

Changelog
Version Description
BuddyBoss 1.4.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.