Contents
bp_current_user_can( string $capability, array|int $args = array() )
Check whether the current user has a given capability.
Description
Parameters
- $capability
-
(Required) Capability or role name.
- $args
-
(Optional) Array of extra arguments applicable to the capability check.
- 'site_id'
(int) Optional. Blog ID. Defaults to the BP root blog. - 'blog_id'
(int) Deprecated. Use $site_id instead. - 'a,...'
(mixed) Optional. Extra arguments applicable to the capability check.
Default value: array()
- 'site_id'
Return
(bool) True if the user has the cap for the given parameters.
Source
File: bp-core/bp-core-caps.php
function bp_current_user_can( $capability, $args = array() ) { // Backward compatibility for older $blog_id parameter. if ( is_int( $args ) ) { $site_id = $args; $args = array(); $args['site_id'] = $site_id; // New format for second parameter. } elseif ( is_array( $args ) && isset( $args['blog_id'] ) ) { // Get the blog ID if set, but don't pass along to `current_user_can_for_blog()`. $args['site_id'] = (int) $args['blog_id']; unset( $args['blog_id'] ); } // Cast $args as an array. $args = (array) $args; // Use root blog if no ID passed. if ( empty( $args['site_id'] ) ) { $args['site_id'] = bp_get_root_blog_id(); } /** This filter is documented in /bp-core/bp-core-template.php */ $current_user_id = apply_filters( 'bp_loggedin_user_id', get_current_user_id() ); // Call bp_user_can(). $retval = bp_user_can( $current_user_id, $capability, $args ); /** * Filters whether or not the current user has a given capability. * * @since BuddyPress 1.6.0 * @since BuddyPress 2.4.0 Pass `$args` variable. * @since BuddyPress 2.7.0 Change format of $args variable array. * * @param bool $retval Whether or not the current user has the capability. * @param string $capability The capability being checked for. * @param int $blog_id Blog ID. Defaults to the BP root blog. * @param array $args Array of extra arguments as originally passed. */ return (bool) apply_filters( 'bp_current_user_can', $retval, $capability, $args['site_id'], $args ); }
Changelog
Version | Description |
---|---|
BuddyPress 2.7.0 Deprecated $args['blog_id'] in favor of $args['site_id']. | BuddyPress 2.7.0 Deprecated $args['blog_id'] in favor of $args['site_id']. |
BuddyPress 1.6.0 | Introduced. |
Related
Uses
Uses | Description |
---|---|
bp-core/bp-core-template.php: bp_loggedin_user_id |
Filters the ID of the currently logged-in user. |
bp-core/bp-core-caps.php: bp_user_can() |
Check whether the specified user has a given capability on a given site. |
bp-core/bp-core-caps.php: bp_current_user_can |
Filters whether or not the current user has a given capability. |
bp-core/bp-core-functions.php: bp_get_root_blog_id() |
Get the ID of the root blog. |
Used By | Description |
---|---|
bp-groups/classes/class-bp-rest-group-invites-endpoint.php: BP_REST_Group_Invites_Endpoint::create_multiple_item_permissions_check() |
Checks if a given request has access to invite a multiple member to a group. |
bp-members/classes/class-bp-rest-members-details-endpoint.php: BP_REST_Members_Details_Endpoint::bp_rest_default_menu() |
Get default dropdown navigation. |
bp-document/classes/class-bp-rest-document-endpoint.php: BP_REST_Document_Endpoint::get_items_permissions_check() |
Checks if a given request has access to get all users. |
bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php: BP_REST_XProfile_Fields_Endpoint::bp_rest_get_field_visibility() |
Check current user can edit the visibility or not. |
bp-settings/classes/class-bp-rest-account-settings-options-endpoint.php: BP_REST_Account_Settings_Options_Endpoint::bp_rest_get_xprofile_field_visibility() |
Check current user can edit the visibility or not. |
bp-document/screens/folders.php: document_screen_single_folder() |
Load an individual folder screen. |
bp-document/bp-document-template.php: bp_folder_user_can_delete() |
Determine if the current user can delete an folder item. |
bp-document/bp-document-template.php: bp_folder_user_can_edit() |
Determine if the current user can edit an folder item. |
bp-document/bp-document-template.php: bp_document_user_can_delete() |
Determine if the current user can delete an document item. |
bp-document/bp-document-template.php: bp_document_user_can_edit() |
Determine if the current user can edit an document item. |
bp-document/bp-document-functions.php: bp_document_user_can_manage_folder() |
Check user have a permission to manage the folder. |
bp-document/bp-document-functions.php: bp_document_user_can_manage_document() |
Check user have a permission to manage the document. |
bp-xprofile/classes/class-bp-rest-xprofile-update-endpoint.php: BP_REST_XProfile_Update_Endpoint::validate_update() |
Validate field update for the user with value. |
bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php: BP_REST_XProfile_Fields_Endpoint::delete_item_permissions_check() |
Check if a given request has access to delete a XProfile field. |
bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php: BP_REST_XProfile_Field_Groups_Endpoint::create_item_permissions_check() |
Check if a given request has access to create a XProfile field group. |
bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php: BP_REST_XProfile_Fields_Endpoint::create_item_permissions_check() |
Check if a given request has access to create a XProfile field. |
bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php: BP_REST_XProfile_Data_Endpoint::get_item_permissions_check() |
Check if a given request has access to get users’s data. |
bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php: BP_REST_XProfile_Data_Endpoint::update_item_permissions_check() |
Check if a given request has access to save XProfile field data. |
bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php: BP_REST_XProfile_Data_Endpoint::can_see() |
Can this user see the XProfile data? |
bp-templates/bp-nouveau/includes/document/ajax.php: bp_nouveau_ajax_document_upload() |
Upload a document via a POST request. |
bp-templates/bp-nouveau/includes/document/ajax.php: bp_nouveau_ajax_document_get_activity() |
Get activity for the document. |
bp-templates/bp-nouveau/includes/messages/ajax.php: bp_nouveau_ajax_delete_thread() |
AJAX delete entire thread. |
bp-settings/classes/class-bp-rest-account-settings-options-endpoint.php: BP_REST_Account_Settings_Options_Endpoint::update_delete_account_fields() |
Delete Account “Export Data”. |
bp-notifications/classes/class-bp-rest-notifications-endpoint.php: BP_REST_Notifications_Endpoint::can_see() |
Can this user see the notification? |
bp-messages/classes/class-bp-rest-messages-actions-endpoint.php: BP_REST_Messages_Actions_Endpoint::action_items_permissions_check() |
Check if a given request has access to thread items. |
bp-messages/classes/class-bp-rest-messages-endpoint.php: BP_REST_Messages_Endpoint::get_items_permissions_check() |
Check if a given request has access to thread items. |
bp-messages/classes/class-bp-rest-messages-endpoint.php: BP_REST_Messages_Endpoint::get_item_permissions_check() |
Check if a given request has access to a thread item. |
bp-messages/classes/class-bp-rest-messages-endpoint.php: BP_REST_Messages_Endpoint::update_item() |
Update metadata for one of the messages of the thread. |
bp-members/classes/class-bp-rest-signup-endpoint.php: BP_REST_Signup_Endpoint::get_items_permissions_check() |
Check if a given request has access to signup items. |
bp-members/classes/class-bp-rest-signup-endpoint.php: BP_REST_Signup_Endpoint::get_item_permissions_check() |
Check if a given request has access to get a signup. |
bp-members/classes/class-bp-rest-signup-endpoint.php: BP_REST_Signup_Endpoint::create_item() |
Create signup. |
bp-members/classes/class-bp-rest-signup-endpoint.php: BP_REST_Signup_Endpoint::create_item_permissions_check() |
Checks if a given request has access to create a signup. |
bp-members/classes/class-bp-rest-members-endpoint.php: BP_REST_Members_Endpoint::delete_item_permissions_check() |
Check if a given request has access to delete a member. |
bp-media/bp-media-template.php: bp_album_user_can_delete() |
Determine if the current user can delete an album item. |
bp-media/bp-media-template.php: bp_media_user_can_delete() |
Determine if the current user can delete an media item. |
bp-media/bp-media-functions.php: bp_media_user_can_manage_album() |
Check user have a permission to manage the album. |
bp-media/bp-media-functions.php: bp_media_user_can_manage_media() |
Check user have a permission to manage the media. |
bp-media/classes/class-bp-rest-media-endpoint.php: BP_REST_Media_Endpoint::get_items_permissions_check() |
Checks if a given request has access to get all users. |
bp-groups/bp-groups-functions.php: groups_can_user_manage_document() |
Check whether a user is allowed to manage document in a given group. |
bp-groups/bp-groups-functions.php: groups_can_user_manage_messages() |
Check whether a user is allowed to manage messages in a given group. |
bp-groups/bp-groups-functions.php: groups_can_user_manage_folders() |
Check whether a user is allowed to manage albums in a given group. |
bp-groups/screens/single/folders.php: document_screen_group_single_folder() |
Load an individual folder screen. |
bp-groups/classes/class-bp-rest-groups-endpoint.php: BP_REST_Groups_Endpoint::can_user_delete_or_update() |
See if user can delete or update a group. |
bp-groups/classes/class-bp-rest-groups-endpoint.php: BP_REST_Groups_Endpoint::can_see() |
Can a user see a group? |
bp-groups/classes/class-bp-rest-groups-endpoint.php: BP_REST_Groups_Endpoint::can_see_hidden_groups() |
Can this user see hidden groups? |
bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php: BP_REST_Group_Membership_Request_Endpoint::create_item_permissions_check() |
Checks if a given request has access to make a group membership request. |
bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php: BP_REST_Group_Membership_Request_Endpoint::update_item_permissions_check() |
Checks if a given request has access to accept a group membership request. |
bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php: BP_REST_Group_Membership_Request_Endpoint::delete_item_permissions_check() |
Checks if a given request has access to reject a group membership request. |
bp-groups/classes/class-bp-rest-groups-details-endpoint.php: BP_REST_Groups_Details_Endpoint::get_item() |
Retrieve groups detail. |
bp-groups/classes/class-bp-rest-groups-details-endpoint.php: BP_REST_Groups_Details_Endpoint::get_group_tab_count() |
Get group count for the tab. |
bp-groups/classes/class-bp-rest-group-membership-endpoint.php: BP_REST_Group_Membership_Endpoint::create_item_permissions_check() |
Checks if a given request has access to join a group. |
bp-groups/classes/class-bp-rest-group-membership-endpoint.php: BP_REST_Group_Membership_Endpoint::update_item_permissions_check() |
Check if a given request has access to update a group member. |
bp-groups/classes/class-bp-rest-group-membership-endpoint.php: BP_REST_Group_Membership_Endpoint::delete_item_permissions_check() |
Check if a given request has access to delete a group member. |
bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php: BP_REST_Group_Membership_Request_Endpoint::get_items() |
Fetch pending group membership requests. |
bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php: BP_REST_Group_Membership_Request_Endpoint::get_items_permissions_check() |
Check if a given request has access to fetch group membership requests. |
bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php: BP_REST_Group_Membership_Request_Endpoint::get_item_permissions_check() |
Check if a given request has access to fetch group membership request. |
bp-groups/classes/class-bp-rest-group-invites-endpoint.php: BP_REST_Group_Invites_Endpoint::get_items() |
Retrieve group invitations. |
bp-groups/classes/class-bp-rest-group-invites-endpoint.php: BP_REST_Group_Invites_Endpoint::get_items_permissions_check() |
Check if a given request has access to group invitations. |
bp-groups/classes/class-bp-rest-group-invites-endpoint.php: BP_REST_Group_Invites_Endpoint::create_item_permissions_check() |
Checks if a given request has access to invite a member to a group. |
bp-groups/classes/class-bp-rest-group-invites-endpoint.php: BP_REST_Group_Invites_Endpoint::update_item_permissions_check() |
Check if a given request has access to accept a group invitation. |
bp-groups/classes/class-bp-rest-group-invites-endpoint.php: BP_REST_Group_Invites_Endpoint::delete_item_permissions_check() |
Check if a given request has access to delete a group invitation. |
bp-friends/classes/class-bp-rest-friends-endpoint.php: BP_REST_Friends_Endpoint::create_item() |
Create a new friendship. |
bp-core/classes/class-bp-admin.php: BP_Admin::bp_add_main_menu_page_admin_menu() |
Register network-admin nav menu elements. |
bp-core/classes/class-bp-rest-components-endpoint.php: BP_REST_Components_Endpoint::get_items_permissions_check() |
Check if a given request has access to list components. |
bp-activity/classes/class-bp-rest-activity-endpoint.php: BP_REST_Activity_Endpoint::show_hidden() |
Show hidden activity? |
bp-activity/screens/following.php: bp_activity_screen_following() |
Load the ‘My Following’ activity page. |
bp-settings/actions/delete-account.php: bp_settings_action_delete_account() |
Handles the deleting of a user. |
bp-settings/classes/class-bp-settings-component.php: BP_Settings_Component::setup_nav() |
Set up navigation. |
bp-settings/classes/class-bp-settings-component.php: BP_Settings_Component::setup_admin_bar() |
Set up the Toolbar. |
bp-media/screens/albums.php: media_screen_single_album() |
Load an individual album screen. |
bp-blogs/classes/class-bp-blogs-blog.php: BP_Blogs_Blog::total_blog_count_for_user() |
Return a count of associated blogs for a given user. |
bp-blogs/classes/class-bp-blogs-blog.php: BP_Blogs_Blog::search_blogs() |
Return a list of blogs matching a search term. |
bp-blogs/classes/class-bp-blogs-blog.php: BP_Blogs_Blog::get_all() |
Retrieve a list of all blogs. |
bp-blogs/classes/class-bp-blogs-blog.php: BP_Blogs_Blog::get_by_letter() |
Retrieve a list of blogs whose names start with a given letter. |
bp-blogs/classes/class-bp-blogs-blog.php: BP_Blogs_Blog::get() |
Retrieve a set of blog-user associations. |
bp-xprofile/bp-xprofile-functions.php: bp_xprofile_get_hidden_field_types_for_user() |
Get the visibility levels that should be hidden for this user pair. |
bp-xprofile/bp-xprofile-template.php: bp_profile_get_visibility_radio_buttons() |
Return the field visibility radio buttons. |
bp-xprofile/bp-xprofile-template.php: bp_profile_get_settings_visibility_select() |
Return the XProfile field visibility select list for settings. |
bp-xprofile/bp-xprofile-template.php: bp_has_profile() |
Query for XProfile groups and fields. |
bp-xprofile/screens/change-avatar.php: xprofile_screen_change_avatar() |
Handles the uploading and cropping of a user avatar. Displays the change avatar page. |
bp-xprofile/screens/change-cover-image.php: xprofile_screen_change_cover_image() |
Displays the change cover photo page. |
bp-xprofile/screens/edit.php: xprofile_screen_edit_profile() |
Handles the display of the profile edit page by loading the correct template file. |
bp-xprofile/actions/delete-avatar.php: xprofile_action_delete_avatar() |
Deletes the active avatar for a user. |
bp-xprofile/classes/class-bp-xprofile-user-admin.php: BP_XProfile_User_Admin::user_admin_profile_metaboxes() |
Render the xprofile metabox for Community Profile screen. |
bp-xprofile/classes/class-bp-xprofile-user-admin.php: BP_XProfile_User_Admin::user_admin_load() |
Save the profile fields in Members community profile page. |
bp-xprofile/bp-xprofile-admin.php: xprofile_add_admin_menu() |
Creates the administration interface menus and checks to see if the DB tables are set up. |
bp-xprofile/bp-xprofile-caps.php: bp_xprofile_map_meta_caps() |
Maps XProfile caps to built in WordPress caps. |
bp-messages/bp-messages-filters.php: bp_messages_enforce_current_user() |
Enforce limitations on viewing private message contents |
bp-messages/actions/notices.php: bp_messages_action_edit_notice() |
Handle editing of sitewide notices. |
bp-messages/actions/unread.php: bp_messages_action_mark_unread() |
Handle marking a single message thread as unread. |
bp-messages/actions/bulk-manage.php: bp_messages_action_bulk_manage() |
Handle bulk management (mark as read/unread, delete) of message threads. |
bp-messages/actions/read.php: bp_messages_action_mark_read() |
Handle marking a single message thread as read. |
bp-messages/actions/view.php: messages_action_conversation() |
Process a request to view a single message thread. |
bp-messages/classes/class-bp-messages-component.php: BP_Messages_Component::setup_nav() |
Set up navigation for user pages. |
bp-messages/classes/class-bp-messages-component.php: BP_Messages_Component::setup_admin_bar() |
Set up the Toolbar. |
bp-messages/classes/class-bp-messages-notices-list-table.php: BP_Messages_Notices_List_Table::ajax_user_can() |
Checks the current user’s permissions |
bp-messages/classes/class-bp-messages-notices-admin.php: BP_Messages_Notices_Admin::register_notices_admin() |
Create a new instance or access the current instance of this class. |
bp-messages/classes/class-bp-messages-notices-admin.php: BP_Messages_Notices_Admin::admin_menu() |
Add the ‘Site Notices’ admin menu item. |
bp-messages/classes/class-bp-messages-thread.php: BP_Messages_Thread::get_messages() |
Get all messages associated with a thread. |
bp-messages/bp-messages-functions.php: messages_send_notice() |
Send a notice. |
bp-groups/bp-groups-adminbar.php: bp_groups_group_admin_menu() |
Add the Group Admin top-level menu when viewing group pages. |
bp-groups/bp-groups-admin.php: bp_groups_admin_process_group_type_bulk_changes() |
Process input from the Group Type bulk change select. |
bp-groups/bp-groups-admin.php: bp_groups_process_group_type_update() |
Process changes from the Group Type metabox. |
bp-groups/bp-groups-admin.php: bp_groups_admin_autocomplete_handler() |
AJAX handler for group member autocomplete requests. |
bp-groups/bp-groups-admin.php: bp_groups_admin_edit() |
Display the single groups edit screen. |
bp-groups/bp-groups-admin.php: bp_groups_admin_create() |
Display the single groups create screen. |
bp-groups/bp-groups-admin.php: bp_groups_admin_delete() |
Display the Group delete confirmation screen. |
bp-groups/screens/single/admin/delete-group.php: groups_screen_group_admin_delete_group() |
Handle the display of the Delete Group page. |
bp-groups/actions/join.php: groups_action_join_group() |
Catch and process “Join Group” button clicks. |
bp-groups/classes/class-bp-group-extension.php: BP_Group_Extension::user_can_see_nav_item() |
Determine whether the current user should see this nav tab. |
bp-groups/classes/class-bp-group-extension.php: BP_Group_Extension::user_can_visit() |
Determine whether the current user has access to visit this tab. |
bp-groups/classes/class-bp-groups-template.php: BP_Groups_Template::__construct() |
Constructor method. |
bp-groups/classes/class-bp-groups-member.php: BP_Groups_Member::get_is_banned_of() |
Get the groups of which a specified user is banned from. |
bp-groups/classes/class-bp-groups-member.php: BP_Groups_Member::total_group_count() |
Get the count of groups of which the specified user is a member. |
bp-groups/classes/class-bp-groups-group.php: BP_Groups_Group::get_total_group_count() |
Get a total group count for the site. |
bp-groups/classes/class-bp-groups-group.php: BP_Groups_Group::get() |
Query for groups. |
bp-groups/classes/class-bp-groups-group.php: BP_Groups_Group::get_user_has_access() |
Checks whether the logged-in user has access to the group. |
bp-groups/classes/class-bp-groups-group.php: BP_Groups_Group::is_visible() |
Checks whether the current user can know the group exists. |
bp-groups/classes/class-bp-groups-component.php: BP_Groups_Component::setup_globals() |
Set up component global data. |
bp-groups/classes/class-bp-groups-component.php: BP_Groups_Component::setup_nav() |
Set up component navigation. |
bp-groups/bp-groups-functions.php: groups_can_user_manage_albums() |
Check whether a user is allowed to manage albums in a given group. |
bp-groups/bp-groups-functions.php: groups_post_update() |
Post an Activity status update affiliated with a group. |
bp-groups/bp-groups-functions.php: groups_is_user_allowed_posting() |
Check whether a user is allowed to post in a given group. |
bp-groups/bp-groups-functions.php: groups_can_user_manage_media() |
Check whether a user is allowed to manage media in a given group. |
bp-groups/bp-groups-activity.php: bp_groups_filter_activity_can_comment() |
Function used to determine if a user can comment on a group activity item. |
bp-groups/bp-groups-template.php: bp_user_can_create_groups() |
Determine if the current logged in user can create groups. |
bp-groups/bp-groups-template.php: bp_group_is_member() |
Check if current user is member of a group. |
bp-groups/bp-groups-template.php: bp_group_is_user_banned() |
Check if a user is banned from a group. |
bp-groups/bp-groups-template.php: bp_group_is_visible() |
Is the group accessible to the currently logged-in user? Despite the name of the function, it has historically checked whether a user has access to a group. |
bp-members/bp-members-functions.php: bp_register_member_type_section() |
Enable/disable profile type functionality. |
bp-members/bp-members-functions.php: bp_core_delete_account() |
Process account deletion requests. |
bp-members/bp-members-functions.php: bp_core_can_edit_settings() |
Check whether the logged-in user can edit settings for the displayed user. |
bp-members/screens/register.php: bp_core_screen_signup() |
Handle the loading of the signup screen. |
bp-members/classes/class-bp-members-admin.php: BP_Members_Admin::users_table_output_type_change_select() |
Display a dropdown to bulk change the profile type of selected user(s). |
bp-members/classes/class-bp-members-admin.php: BP_Members_Admin::users_table_process_bulk_type_change() |
Process bulk profile type change submission from the WP admin users list table. |
bp-members/classes/class-bp-members-admin.php: BP_Members_Admin::user_admin() |
Display the user’s profile. |
bp-members/classes/class-bp-members-admin.php: BP_Members_Admin::process_member_type_update() |
Process changes from the profile type metabox. |
bp-members/classes/class-bp-members-admin.php: BP_Members_Admin::row_actions() |
Add a link to Profile in Users listing row actions. |
bp-members/classes/class-bp-members-admin.php: BP_Members_Admin::member_can_edit() |
Can the current user edit the one displayed. |
bp-members/classes/class-bp-members-component.php: BP_Members_Component::setup_canonical_stack() |
Set up canonical stack for this component. |
bp-invites/classes/class-bp-invites-component.php: BP_Invites_Component::register_post_types() | |
bp-templates/bp-nouveau/includes/media/ajax.php: bp_nouveau_ajax_media_get_activity() |
Get activity for the media |
bp-templates/bp-nouveau/includes/messages/ajax.php: bp_nouveau_ajax_messages_send_reply() |
AJAX send message reply and display error. |
bp-templates/bp-nouveau/includes/messages/ajax.php: bp_nouveau_ajax_messages_thread_read() |
AJAX mark message as read. |
bp-templates/bp-nouveau/includes/messages/ajax.php: bp_nouveau_ajax_delete_thread_messages() |
AJAX delete logged in user entire messages of given thread. |
bp-templates/bp-nouveau/includes/messages/ajax.php: bp_nouveau_ajax_readunread_thread_messages() |
AJAX mark message as read/unread |
bp-templates/bp-nouveau/includes/groups/classes.php: BP_Nouveau_Customizer_Group_Nav::__construct() |
Constructor |
bp-templates/bp-nouveau/includes/groups/template-tags.php: bp_nouveau_group_template_part() |
Load the appropriate content for the single group pages |
bp-templates/bp-nouveau/includes/groups/functions.php: bp_nouveau_groups_screen_invites_restriction() |
Group invites restriction screen. |
bp-templates/bp-nouveau/includes/template-tags.php: bp_nouveau_get_customizer_link() |
Get a link to reach a specific section into the customizer |
bp-core/bp-core-taxonomy.php: bp_register_default_taxonomies() |
Register our default taxonomies. |
bp-core/admin/bp-core-admin-tools.php: bp_admin_repair_handler() |
Handle the processing and feedback of the admin tools page. |
bp-core/admin/bp-core-admin-functions.php: bp_admin_separator() |
Add a separator to the WordPress admin menus. |
bp-core/admin/bp-core-admin-functions.php: bp_admin_custom_menu_order() |
Tell WordPress we have a custom menu order. |
bp-core/admin/bp-core-admin-functions.php: bp_admin_menu_order() |
Move our custom separator above our custom post types. |
bp-core/admin/bp-core-admin-functions.php: bp_core_print_admin_notices() |
Print admin messages to admin_notices or network_admin_notices. |
bp-core/admin/bp-core-admin-functions.php: bp_core_activation_notice() |
Verify that some BP prerequisites are set up properly, and notify the admin if not. |
bp-core/deprecated/buddypress/1.7.php: bp_core_allow_default_theme() |
On multiblog installations you must first allow themes to be activated and show up on the theme selection screen. This function will let the BuddyPress bundled themes show up on the root blog selection screen and bypass this step. It also means that the themes won’t show for selection on other blogs. |
bp-core/deprecated/buddypress/2.1.php: bp_groups_adminbar_admin_menu() |
Add menu items to the BuddyBar. |
bp-core/deprecated/buddypress/1.5.php: bp_dtheme_page_on_front_update() |
In BuddyPress 1.2.x, this function hijacked the saving of page on front setting to save the activity feed setting. |
bp-core/deprecated/buddypress/3.0.php: bp_core_action_delete_user() |
Process user deletion requests. |
bp-core/bp-core-template.php: bp_user_has_access() |
Returns whether or not a user has access. |
bp-core/classes/class-bp-admin.php: BP_Admin::site_admin_menus() |
Register site-admin nav menu elements. |
bp-core/classes/class-bp-admin.php: BP_Admin::admin_menus() |
Register site- or network-admin nav menu elements. |
bp-core/classes/class-bp-core.php: BP_Core::register_post_types() |
Set up post types. |
bp-core/bp-core-buddybar.php: bp_core_create_nav_link() |
Add a link to the main BuddyPress navigation. |
bp-core/bp-core-buddybar.php: bp_core_register_nav_screen_function() |
Register a screen function for an item in the main nav array. |
bp-core/bp-core-buddybar.php: bp_core_create_subnav_link() |
Add a subnav link to the BuddyPress navigation. |
bp-core/bp-core-buddybar.php: bp_core_register_subnav_screen_function() |
Register a screen function, whether or not a related subnav link exists. |
bp-core/bp-core-buddybar.php: bp_core_maybe_hook_new_subnav_screen_function() |
For a given subnav item, either hook the screen function or generate redirect arguments, as necessary. |
bp-core/bp-core-functions.php: bp_nav_menu_get_loggedin_pages() |
Create fake “post” objects for BP’s logged-in nav menu for use in the WordPress “Menus” settings page. |
bp-core/bp-core-attachments.php: bp_attachments_current_user_can() |
Check the current user’s capability to edit an avatar for a given object. |
bp-core/bp-core-catchuri.php: bp_core_set_uri_globals() |
Analyze the URI and break it down into BuddyPress-usable chunks. |
bp-core/bp-core-options.php: bp_force_friendship_to_message() |
Is force friendship to message disabled? |
bp-activity/bp-activity-functions.php: bp_activity_user_can_mark_spam() |
Fetch whether the current user is allowed to mark items as spam. |
bp-activity/bp-activity-functions.php: bp_activity_user_can_read() |
Can a user see a particular activity item? |
bp-activity/screens/favorites.php: bp_activity_screen_favorites() |
Load the ‘Favorites’ activity page. |
bp-activity/screens/mentions.php: bp_activity_screen_mentions() |
Load the ‘Mentions’ activity page. |
bp-activity/bp-activity-adminbar.php: bp_activity_admin_menu() |
Add the Activity top-level menu link when viewing single activity item. |
bp-activity/screens/friends.php: bp_activity_screen_friends() |
Load the ‘My Connections’ activity page. |
bp-activity/screens/groups.php: bp_activity_screen_groups() |
Load the ‘My Groups’ activity page. |
bp-activity/bp-activity-admin.php: bp_activity_admin_reply() |
AJAX receiver for Activity replies via the admin screen. |
bp-activity/bp-activity-template.php: bp_activity_user_can_delete() |
Determine if the current user can delete an activity item. |
bp-activity/bp-activity-template.php: bp_has_activities() |
Initialize the activity loop. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.