Base strategy class for interfacing with User Engagements, which other classes will extend.

since 2.6.0 bbPress (r6722)
package bbPress

 Methods

Add a user id to an object.

add_user_to_object(integer $object_id = 0, integer $user_id = 0, string $meta_key = '', string $meta_type = 'post', boolean $unique = false) : boolean
since 2.6.0 bbPress (r6722)

Parameters

$object_id

integer

The object id.

$user_id

integer

The user id.

$meta_key

string

The relationship key.

$meta_type

string

The relationship type (usually 'post').

$unique

boolean

Whether meta key should be unique to the object.

Returns

booleanReturns true on success, false on failure.

Get the part of the query responsible for JOINing objects to relationships.

get_query(array $args = array(), $context_key = '', string $meta_key = '', string $meta_type = 'post') : array
since 2.6.0 bbPress (r6737)

Parameters

$args

array

$context_key

$meta_key

string

$meta_type

string

Returns

array

Get users of an object.

get_users_for_object(integer $object_id = 0, string $meta_key = '', string $meta_type = 'post') : array
since 2.6.0 bbPress (r6722)

Parameters

$object_id

integer

The object id.

$meta_key

string

The key used to index this relationship.

$meta_type

string

The type of meta to look in.

Returns

arrayReturns ids of users.

Remove all users from all objects.

remove_all_users_from_all_objects(string $meta_key = '', string $meta_type = 'post') : boolean
since 2.6.0 bbPress (r6722)

Parameters

$meta_key

string

The relationship key.

$meta_type

string

The relationship type (usually 'post').

Returns

booleanReturns true on success, false on failure.

Remove an object from all users.

remove_object_from_all_users(integer $object_id = 0, string $meta_key = '', string $meta_type = 'post') : boolean
since 2.6.0 bbPress (r6722)

Parameters

$object_id

integer

The object id.

$meta_key

string

The relationship key.

$meta_type

string

The relationship type (usually 'post').

Returns

booleanReturns true on success, false on failure.

Remove a user id from all objects.

remove_user_from_all_objects(integer $user_id = 0, string $meta_key = '', string $meta_type = 'post') : boolean
since 2.6.0 bbPress (r6722)

Parameters

$user_id

integer

The user id.

$meta_key

string

The relationship key.

$meta_type

string

The relationship type (usually 'post').

Returns

booleanReturns true on success, false on failure.

Remove a user id from an object.

remove_user_from_object(integer $object_id = 0, integer $user_id = 0, string $meta_key = '', string $meta_type = 'post') : boolean
since 2.6.0 bbPress (r6722)

Parameters

$object_id

integer

The object id.

$user_id

integer

The user id.

$meta_key

string

The relationship key.

$meta_type

string

The relationship type (usually 'post').

Returns

booleanReturns true on success, false on failure.

 Properties

 

Type of strategy being used.

$type : string

Default

''
since 2.6.0 bbPress (r6737)