BP_Activity_Activity::__construct( int|bool $id = false )

Constructor method.

Description

Parameters

$id

(Optional) The ID of a specific activity item.

Default value: false

Source

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

	public function __construct( $id = false ) {
		// Instantiate errors object.
		$this->errors = new WP_Error;

		if ( !empty( $id ) ) {
			$this->id = (int) $id;
			$this->populate();
		}
	}

Changelog

Changelog
Version Description
BuddyPress 1.5.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.