[ Index ]

PHP Cross Reference of BBPress

title

Body

[close]

/src/includes/common/ -> engagements.php (summary)

bbPress Common Engagements This file contains the common classes and functions for interacting with the bbPress engagements API. See `includes/users/engagements.php` for more.

File Size: 806 lines (23 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 4 classes

BBP_User_Engagements_Base:: (7 methods):
  add_user_to_object()
  remove_user_from_object()
  remove_user_from_all_objects()
  remove_object_from_all_users()
  remove_all_users_from_all_objects()
  get_users_for_object()
  get_query()

BBP_User_Engagements_Meta:: (7 methods):
  add_user_to_object()
  remove_user_from_object()
  remove_user_from_all_objects()
  remove_object_from_all_users()
  remove_all_users_from_all_objects()
  get_users_for_object()
  get_query()

BBP_User_Engagements_Term:: (8 methods):
  jit_taxonomy()
  add_user_to_object()
  remove_user_from_object()
  remove_user_from_all_objects()
  remove_object_from_all_users()
  remove_all_users_from_all_objects()
  get_users_for_object()
  get_query()

BBP_User_Engagements_User:: (9 methods):
  get_user_option_key()
  parse_comma_list()
  add_user_to_object()
  remove_user_from_object()
  remove_user_from_all_objects()
  remove_object_from_all_users()
  remove_all_users_from_all_objects()
  get_users_for_object()
  get_query()

Defines 9 functions

  bbp_user_engagements_interface()

Class: BBP_User_Engagements_Base  - X-Ref

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

add_user_to_object( $object_id = 0, $user_id = 0, $meta_key = '', $meta_type = 'post', $unique = false )   X-Ref
Add a user id to an object

since: 2.6.0 bbPress (r6722)
return: bool Returns true on success, false on failure
param: int    $object_id The object id
param: int    $user_id   The user id
param: string $meta_key  The relationship key
param: string $meta_type The relationship type (usually 'post')
param: bool   $unique    Whether meta key should be unique to the object

remove_user_from_object( $object_id = 0, $user_id = 0, $meta_key = '', $meta_type = 'post' )   X-Ref
Remove a user id from an object

since: 2.6.0 bbPress (r6722)
return: bool Returns true on success, false on failure
param: int    $object_id The object id
param: int    $user_id   The user id
param: string $meta_key  The relationship key
param: string $meta_type The relationship type (usually 'post')

remove_user_from_all_objects( $user_id = 0, $meta_key = '', $meta_type = 'post' )   X-Ref
Remove a user id from all objects

since: 2.6.0 bbPress (r6722)
return: bool Returns true on success, false on failure
param: int    $user_id   The user id
param: string $meta_key  The relationship key
param: string $meta_type The relationship type (usually 'post')

remove_object_from_all_users( $object_id = 0, $meta_key = '', $meta_type = 'post' )   X-Ref
Remove an object from all users

since: 2.6.0 bbPress (r6722)
return: bool Returns true on success, false on failure
param: int    $object_id The object id
param: int    $user_id   The user id
param: string $meta_key  The relationship key
param: string $meta_type The relationship type (usually 'post')

remove_all_users_from_all_objects( $meta_key = '', $meta_type = 'post' )   X-Ref
Remove all users from all objects

since: 2.6.0 bbPress (r6722)
return: bool Returns true on success, false on failure
param: string $meta_key  The relationship key
param: string $meta_type The relationship type (usually 'post')

get_users_for_object( $object_id = 0, $meta_key = '', $meta_type = 'post' )   X-Ref
Get users of an object

since: 2.6.0 bbPress (r6722)
return: array Returns ids of users
param: int    $object_id The object id
param: string $meta_key  The key used to index this relationship
param: string $meta_type The type of meta to look in

get_query( $args = array()   X-Ref
Get the part of the query responsible for JOINing objects to relationships.

since: 2.6.0 bbPress (r6737)
return: array
param: array  $args
param: string $meta_key
param: string $meta_type

Class: BBP_User_Engagements_Meta  - X-Ref

Meta strategy for interfacing with User Engagements

add_user_to_object( $object_id = 0, $user_id = 0, $meta_key = '', $meta_type = 'post', $unique = false )   X-Ref
Add a user id to an object

since: 2.6.0 bbPress (r6722)
return: bool Returns true on success, false on failure
param: int    $object_id The object id
param: int    $user_id   The user id
param: string $meta_key  The relationship key
param: string $meta_type The relationship type (usually 'post')
param: bool   $unique    Whether meta key should be unique to the object

remove_user_from_object( $object_id = 0, $user_id = 0, $meta_key = '', $meta_type = 'post' )   X-Ref
Remove a user id from an object

since: 2.6.0 bbPress (r6722)
return: bool Returns true on success, false on failure
param: int    $object_id The object id
param: int    $user_id   The user id
param: string $meta_key  The relationship key
param: string $meta_type The relationship type (usually 'post')

remove_user_from_all_objects( $user_id = 0, $meta_key = '', $meta_type = 'post' )   X-Ref
Remove a user id from all objects

since: 2.6.0 bbPress (r6722)
return: bool Returns true on success, false on failure
param: int    $user_id   The user id
param: string $meta_key  The relationship key
param: string $meta_type The relationship type (usually 'post')

remove_object_from_all_users( $object_id = 0, $meta_key = '', $meta_type = 'post' )   X-Ref
Remove an object from all users

since: 2.6.0 bbPress (r6722)
return: bool Returns true on success, false on failure
param: int    $object_id The object id
param: int    $user_id   The user id
param: string $meta_key  The relationship key
param: string $meta_type The relationship type (usually 'post')

remove_all_users_from_all_objects( $meta_key = '', $meta_type = 'post' )   X-Ref
Remove all users from all objects

since: 2.6.0 bbPress (r6722)
return: bool Returns true on success, false on failure
param: string $meta_key  The relationship key
param: string $meta_type The relationship type (usually 'post')

get_users_for_object( $object_id = 0, $meta_key = '', $meta_type = 'post' )   X-Ref
Get users of an object

since: 2.6.0 bbPress (r6722)
return: array Returns ids of users
param: int    $object_id The object id
param: string $meta_key  The key used to index this relationship
param: string $meta_type The type of meta to look in

get_query( $args = array()   X-Ref
Get the part of the query responsible for JOINing objects to relationships.

since: 2.6.0 bbPress (r6737)
return: array
param: array  $args
param: string $meta_key
param: string $meta_type

Class: BBP_User_Engagements_Term  - X-Ref

Term strategy for interfacing with User Engagements

jit_taxonomy( $tax_key = '', $object_type = 'user' )   X-Ref
Register an engagement taxonomy just-in-time for immediate use

since: 2.6.0 bbPress (r6737)
param: string $tax_key
param: string $object_type

add_user_to_object( $object_id = 0, $user_id = 0, $meta_key = '', $meta_type = 'post', $unique = false )   X-Ref
Add a user id to an object

since: 2.6.0 bbPress (r6737)
return: bool Returns true on success, false on failure
param: int    $object_id The object id
param: int    $user_id   The user id
param: string $meta_key  The relationship key
param: string $meta_type The relationship type (usually 'post')
param: bool   $unique    Whether meta key should be unique to the object

remove_user_from_object( $object_id = 0, $user_id = 0, $meta_key = '', $meta_type = 'post' )   X-Ref
Remove a user id from an object

since: 2.6.0 bbPress (r6737)
return: bool Returns true on success, false on failure
param: int    $object_id The object id
param: int    $user_id   The user id
param: string $meta_key  The relationship key
param: string $meta_type The relationship type (usually 'post')

remove_user_from_all_objects( $user_id = 0, $meta_key = '', $meta_type = 'post' )   X-Ref
Remove a user id from all objects

since: 2.6.0 bbPress (r6737)
return: bool Returns true on success, false on failure
param: int    $user_id   The user id
param: string $meta_key  The relationship key
param: string $meta_type The relationship type (usually 'post')

remove_object_from_all_users( $object_id = 0, $meta_key = '', $meta_type = 'post' )   X-Ref
Remove an object from all users

since: 2.6.0 bbPress (r6737)
return: bool Returns true on success, false on failure
param: int    $object_id The object id
param: int    $user_id   The user id
param: string $meta_key  The relationship key
param: string $meta_type The relationship type (usually 'post')

remove_all_users_from_all_objects( $meta_key = '', $meta_type = 'post' )   X-Ref
Remove all users from all objects

since: 2.6.0 bbPress (r6737)
return: bool Returns true on success, false on failure
param: string $meta_key  The relationship key
param: string $meta_type The relationship type (usually 'post')

get_users_for_object( $object_id = 0, $meta_key = '', $meta_type = 'post' )   X-Ref
Get users of an object

since: 2.6.0 bbPress (r6737)
return: array Returns ids of users
param: int    $object_id The object id
param: string $meta_key  The key used to index this relationship
param: string $meta_type The type of meta to look in

get_query( $args = array()   X-Ref
Get the part of the query responsible for JOINing objects to relationships.

since: 2.6.0 bbPress (r6737)
return: array
param: array  $args
param: string $meta_key
param: string $meta_type

Class: BBP_User_Engagements_User  - X-Ref

User strategy for interfacing with User Engagements

get_user_option_key( $meta_key = '', $object_id = 0, $prefix = false )   X-Ref
Private function to map 2.6 meta keys to 2.5 user-option keys.

since: 2.6.0 bbPress (r6844)
return: string
param: string $meta_key
param: int    $object_id
param: bool   $prefix

parse_comma_list( $results = '' )   X-Ref
Turn a comma-separated string into an array of integers

since: 2.6.0 bbPress (r6844)
return: array
param: string $results

add_user_to_object( $object_id = 0, $user_id = 0, $meta_key = '', $meta_type = 'post', $unique = false )   X-Ref
Add a user id to an object

since: 2.6.0 bbPress (r6844)
return: bool Returns true on success, false on failure
param: int    $object_id The object id
param: int    $user_id   The user id
param: string $meta_key  The relationship key
param: string $meta_type The relationship type (usually 'post')
param: bool   $unique    Whether meta key should be unique to the object

remove_user_from_object( $object_id = 0, $user_id = 0, $meta_key = '', $meta_type = 'post' )   X-Ref
Remove a user id from an object

since: 2.6.0 bbPress (r6844)
return: bool Returns true on success, false on failure
param: int    $object_id The object id
param: int    $user_id   The user id
param: string $meta_key  The relationship key
param: string $meta_type The relationship type (usually 'post')

remove_user_from_all_objects( $user_id = 0, $meta_key = '', $meta_type = 'post' )   X-Ref
Remove a user id from all objects

since: 2.6.0 bbPress (r6844)
return: bool Returns true on success, false on failure
param: int    $user_id   The user id
param: string $meta_key  The relationship key
param: string $meta_type The relationship type (usually 'post')

remove_object_from_all_users( $object_id = 0, $meta_key = '', $meta_type = 'post' )   X-Ref
Remove an object from all users

since: 2.6.0 bbPress (r6844)
return: bool Returns true on success, false on failure
param: int    $object_id The object id
param: int    $user_id   The user id
param: string $meta_key  The relationship key
param: string $meta_type The relationship type (usually 'post')

remove_all_users_from_all_objects( $meta_key = '', $meta_type = 'post' )   X-Ref
Remove all users from all objects

since: 2.6.0 bbPress (r6844)
return: bool Returns true on success, false on failure
param: string $meta_key  The relationship key
param: string $meta_type The relationship type (usually 'post')

get_users_for_object( $object_id = 0, $meta_key = '', $meta_type = 'post' )   X-Ref
Get users of an object

The database queries in this function were cached in bbPress versions
older than 2.6, but no longer are to avoid cache pollution.

since: 2.6.0 bbPress (r6844)
return: array Returns ids of users
param: int    $object_id The object id
param: string $meta_key  The key used to index this relationship
param: string $meta_type The type of meta to look in

get_query( $args = array()   X-Ref
Get the part of the query responsible for JOINing objects to relationships.

since: 2.6.0 bbPress (r6844)
return: array
param: array  $args
param: string $meta_key
param: string $meta_type

Functions
Functions that are not part of a class:

bbp_user_engagements_interface( $rel_key = '', $rel_type = 'post' )   X-Ref
Return the strategy used for storing user engagements

since: 2.6.0 bbPress (r6722)
return: string
param: string $rel_key  The key used to index this relationship
param: string $rel_type The type of meta to look in



Generated: Thu Sep 19 01:01:28 2019 Cross-referenced by PHPXref 0.7.1