BP_Media_Template::the_media()
Set up the current media item inside the loop.
Description
Used by bp_the_media() to set up the current media item data while looping, so that template tags used during that iteration make reference to the current media item.
See also
Source
File: bp-media/classes/class-bp-media-template.php
public function the_media() {
$this->in_the_loop = true;
$this->media = $this->next_media();
if ( is_array( $this->media ) ) {
$this->media = (object) $this->media;
}
// Loop has just started.
if ( $this->current_media == 0 ) {
/**
* Fires if the current media item is the first in the activity loop.
*
* @since BuddyBoss 1.1.0
*/
do_action('media_loop_start');
}
}
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.