[ Index ]

PHP Cross Reference of BBPress

title

Body

[close]

/src/includes/users/ -> capabilities.php (summary)

bbPress User Capabilites Used to map user capabilities to WordPress's existing capabilities.

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

Defines 19 functions

  bbp_map_primary_meta_caps()
  bbp_set_user_role()
  bbp_get_user_role()
  bbp_get_user_blog_role()
  bbp_profile_update_role()
  bbp_set_current_user_default_role()
  bbp_get_user_role_map()
  bbp_is_user_spammer()
  bbp_make_spam_user()
  bbp_make_ham_user()
  bbp_is_user_deleted()
  bbp_is_user_active()
  bbp_is_user_inactive()
  bbp_is_user_keymaster()
  bbp_user_has_profile()
  bbp_add_moderator()
  bbp_remove_moderator()
  bbp_get_moderator_ids()
  bbp_get_moderators()

Functions
Functions that are not part of a class:

bbp_map_primary_meta_caps( $caps = array()   X-Ref
Maps primary capabilities

since: 2.2.0 bbPress (r4242)
return: array Actual capabilities for meta capability
param: array  $caps Capabilities for meta capability.
param: string $cap Capability name.
param: int    $user_id User id.
param: array  $args Arguments.

bbp_set_user_role( $user_id = 0, $new_role = '' )   X-Ref
Set a user's role in the forums

since: 2.1.0 bbPress (r3860)
return: string
param: int $user_id

bbp_get_user_role( $user_id = 0 )   X-Ref
Return a user's forums role

since: 2.1.0 bbPress (r3860)
return: string
param: int $user_id

bbp_get_user_blog_role( $user_id = 0 )   X-Ref
Return a user's blog role

since: 2.3.0 bbPress (r4446)
return: string
param: int $user_id

bbp_profile_update_role( $user_id = 0 )   X-Ref
Helper function hooked to 'bbp_profile_update' action to save or
update user roles and capabilities.

since: 2.2.0 bbPress (r4235)
param: int $user_id

bbp_set_current_user_default_role()   X-Ref
Add the default role to the current user if needed

This function will bail if the forum is not global in a multisite
installation of WordPress, or if the user is marked as spam or deleted.

since: 2.0.0 bbPress (r3380)
return: If not multisite, not global, or user is deleted/spammed

bbp_get_user_role_map()   X-Ref
Return a map of WordPress roles to bbPress roles. Used to automatically grant
appropriate bbPress roles to WordPress users that wouldn't already have a
role in the forums. Also guarantees WordPress admins get the Keymaster role.

since: 2.2.0 bbPress (r4334)
return: array Filtered array of WordPress roles to bbPress roles

bbp_is_user_spammer( $user_id = 0 )   X-Ref
Checks if the user has been marked as a spammer.

since: 2.0.0 bbPress (r3355)
return: bool True if spammer, False if not.
param: int $user_id int The ID for the user.

bbp_make_spam_user( $user_id = 0 )   X-Ref
Mark a users topics and replies as spam when the user is marked as spam

since: 2.0.0 bbPress (r3405)
return: bool If no user ID passed.
param: int $user_id Optional. User ID to spam. Defaults to displayed user.

bbp_make_ham_user( $user_id = 0 )   X-Ref
Mark a users topics and replies as spam when the user is marked as spam

since: 2.0.0 bbPress (r3405)
return: bool If no user ID passed.
param: int $user_id Optional. User ID to unspam. Defaults to displayed user.

bbp_is_user_deleted( $user_id = 0 )   X-Ref
Checks if the user has been marked as deleted.

since: 2.0.0 bbPress (r3355)
return: bool True if deleted, False if not.
param: int $user_id int The ID for the user.

bbp_is_user_active( $user_id = 0 )   X-Ref
Checks if user is active

since: 2.0.0 bbPress (r3502)
return: bool True if public, false if not
param: int $user_id The user ID to check

bbp_is_user_inactive( $user_id = 0 )   X-Ref
Checks if user is not active.

since: 2.0.0 bbPress (r3502)
return: bool True if inactive, false if active
param: int $user_id The user ID to check. Defaults to current user ID

bbp_is_user_keymaster( $user_id = 0 )   X-Ref
Checks if user is a keymaster

since: 2.3.0 bbPress (r4783)
return: bool True if keymaster, false if not
param: int $user_id

bbp_user_has_profile( $user_id = 0 )   X-Ref
Does a user have a profile for the current site

since: 2.2.0 bbPress (r4362)
return: bool Whether or not the user has a profile on this blog_id.
param: int $user_id User ID to check

bbp_add_moderator( $object_id = 0, $user_id = 0, $object_type = 'post' )   X-Ref
Add a moderator to an object

since: 2.6.0 bbPress (r6056)
return: bool
param: int    $object_id   Traditionally a post ID
param: int    $user_id     User ID
param: string $object_type Type of meta (post,term,user,comment)

bbp_remove_moderator( $object_id = 0, $user_id = 0, $object_type = 'post' )   X-Ref
Remove a moderator user ID from an object

since: 2.6.0 bbPress (r6056)
return: bool
param: int    $object_id   Traditionally a post ID
param: int    $user_id     User ID
param: string $object_type Type of meta (post,term,user,comment)

bbp_get_moderator_ids( $object_id = 0, $object_type = 'post' )   X-Ref
Get user IDs of moderators for an object

since: 2.6.0 bbPress (r6056)
return: array
param: int    $object_id   Traditionally a post ID
param: string $object_type Type of meta (post,term,user,comment)

bbp_get_moderators( $object_id = 0, $object_type = 'post' )   X-Ref
Get moderators for a specific object ID. Will return global moderators when
object ID is empty.

since: 2.6.0 bbPress (r6056)
return: array
param: int    $object_id   Traditionally a post ID
param: string $object_type Type of meta (post,term,user,comment)



Generated: Mon Dec 9 01:01:26 2019 Cross-referenced by PHPXref 0.7.1