BP_Activity_Template::the_activity()

Set up the current activity item inside the loop.


Description Description

Used by bp_the_activity() to set up the current activity item data while looping, so that template tags used during that iteration make reference to the current activity item.

See also See also


Top ↑

Source Source

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

	public function the_activity() {

		$this->in_the_loop = true;
		$this->activity    = $this->next_activity();

		if ( is_array( $this->activity ) ) {
			$this->activity = (object) $this->activity;
		}

		// Loop has just started.
		if ( $this->current_activity == 0 ) {

			/**
			 * Fires if the current activity item is the first in the activity loop.
			 *
			 * @since 1.1.0
			 */
			do_action('activity_loop_start');
		}
	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.