BBP_User_Engagements_Base::add_user_to_object( int $object_id, int $user_id, string $meta_key = '', string $meta_type = 'post', bool $unique = false )
Add a user id to an object
Description Description
Parameters Parameters
- $object_id
-
(Required) The object id
- $user_id
-
(Required) The user id
- $meta_key
-
(Optional) The relationship key
Default value: ''
- $meta_type
-
(Optional) The relationship type (usually 'post')
Default value: 'post'
- $unique
-
(Optional) Whether meta key should be unique to the object
Default value: false
Return Return
(bool) Returns true on success, false on failure
Source Source
File: includes/common/engagements.php
public function add_user_to_object( $object_id = 0, $user_id = 0, $meta_key = '', $meta_type = 'post', $unique = false ) { }
Changelog Changelog
Version | Description |
---|---|
2.6.0 | Introduced. |