BP_Friends_Friendship::__construct( int|null $id = null, bool $is_request = false, bool $populate_friend_details = true )
Constructor method.
Description
Parameters
- $id
-
(Optional) The ID of an existing friendship.
Default value: null
- $is_request
-
(Optional) Deprecated.
Default value: false
- $populate_friend_details
-
(Optional) True if friend details should be queried.
Default value: true
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 ); } }
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.