BP_Friends_Friendship::__construct( int|null $id = null, bool $is_request = false, bool $populate_friend_details = true )

Constructor method.


Parameters Parameters

$id

(int|null) (Optional) The ID of an existing friendship.

Default value: null

$is_request

(bool) (Optional) Deprecated.

Default value: false

$populate_friend_details

(bool) (Optional) True if friend details should be queried.

Default value: true


Source Source

File: bp-friends/classes/class-bp-friends-friendship.php

	public function __construct( $id = null, $is_request = false, $populate_friend_details = true ) {
		$this->is_request = $is_request;

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


Top ↑

Changelog Changelog

Changelog
Version Description
1.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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