BP_Media_Template::user_medias()

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

Description

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

See also

Return

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

Source

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

	public function user_medias() {
		if ( ( $this->current_media + 1 ) < $this->media_count ) {
			return true;
		} elseif ( ( $this->current_media + 1 ) == $this->media_count ) {

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

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

		$this->in_the_loop = false;

		return false;
	}

Changelog

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