[ Index ] |
PHP Cross Reference of BBPress |
[Source view] [Print] [Project Stats]
bbPress User Capabilities Used to map user capabilities to WordPress's existing capabilities.
File Size: | 867 lines (21 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
bbp_map_primary_meta_caps( $caps = array() X-Ref |
Maps primary capabilities return: array Actual capabilities for meta capability since: 2.2.0 bbPress (r4242) 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 return: mixed False if no change. String of new role if changed. since: 2.1.0 bbPress (r3860) param: int $user_id |
bbp_get_user_role( $user_id = 0 ) X-Ref |
Return a user's forums role return: string since: 2.1.0 bbPress (r3860) param: int $user_id |
bbp_get_user_blog_role( $user_id = 0 ) X-Ref |
Return a user's blog role return: string since: 2.3.0 bbPress (r4446) 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_is_valid_role( $role = '' ) X-Ref |
Check if a role ID is valid This helper function accepts a role ID as a string, and compares it against the array of registered dynamic roles. Use this function anytime you are manually attempting to set a user role without using the bbp_set_user_role() function, or if you need to halt additional processing during role validation. return: bool True if role is valid. False if role is not valid. since: 2.6.5 param: string $role A well-formed (string) role ID to validate |
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. return: If not multisite, not global, or user is deleted/spammed since: 2.0.0 bbPress (r3380) |
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. return: array Filtered array of WordPress roles to bbPress roles since: 2.2.0 bbPress (r4334) |
bbp_is_user_spammer( $user_id = 0 ) X-Ref |
Checks if the user has been marked as a spammer. return: bool True if spammer, False if not. since: 2.0.0 bbPress (r3355) 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 return: bool If no user ID passed. since: 2.0.0 bbPress (r3405) 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 return: bool If no user ID passed. since: 2.0.0 bbPress (r3405) 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. return: bool True if deleted, False if not. since: 2.0.0 bbPress (r3355) param: int $user_id int The ID for the user. |
bbp_is_user_active( $user_id = 0 ) X-Ref |
Checks if user is active return: bool True if public, false if not since: 2.0.0 bbPress (r3502) param: int $user_id The user ID to check |
bbp_is_user_inactive( $user_id = 0 ) X-Ref |
Checks if user is not active. return: bool True if inactive, false if active since: 2.0.0 bbPress (r3502) 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 return: bool True if keymaster, false if not since: 2.3.0 bbPress (r4783) param: int $user_id |
bbp_user_has_profile( $user_id = 0 ) X-Ref |
Does a user have a profile for the current site return: bool Whether or not the user has a profile on this blog_id. since: 2.2.0 bbPress (r4362) 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 return: bool since: 2.6.0 bbPress (r6056) 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 return: bool since: 2.6.0 bbPress (r6056) 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 return: array since: 2.6.0 bbPress (r6056) 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. return: array since: 2.6.0 bbPress (r6056) param: int $object_id Traditionally a post ID param: string $object_type Type of meta (post,term,user,comment) |
Generated: Thu Jan 30 01:00:58 2025 | Cross-referenced by PHPXref 0.7.1 |