Contents
bp_get_current_group_id()
Returns the ID of the current group.
Description
Return
(int) $current_group_id The id of the current group, if there is one.
Source
File: bp-groups/bp-groups-template.php
function bp_get_current_group_id() { $current_group = groups_get_current_group(); $current_group_id = isset( $current_group->id ) ? (int) $current_group->id : 0; /** * Filters the ID of the current group. * * @since BuddyPress 1.5.0 * * @param int $current_group_id ID of the current group. * @param object $current_group Instance holding the current group. */ return apply_filters( 'bp_get_current_group_id', $current_group_id, $current_group ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.5.0 | Introduced. |
Related
Uses
Uses | Description |
---|---|
bp-groups/bp-groups-functions.php: groups_get_current_group() |
Get the BP_Groups_Group object corresponding to the current group. |
bp-groups/bp-groups-template.php: bp_get_current_group_id |
Filters the ID of the current group. |
Used By | Description |
---|---|
bp-templates/bp-nouveau/includes/ajax.php: bp_nouveau_ajax_save_cover_position() |
Save Cover image position for group and member. |
bp-document/bp-document-template.php: bp_has_folders() |
Initialize the folder loop. |
bp-document/bp-document-functions.php: bp_document_user_document_folder_tree_view_li_html() |
Return the breadcrumbs. |
bp-document/bp-document-functions.php: bp_document_folder_bradcrumb() |
This function will give the breadcrumbs html. |
bp-document/bp-document-functions.php: bp_document_get_total_group_document_count() |
Get the document count of a given group. |
bp-document/bp-document-functions.php: bp_document_get_total_group_folder_count() |
Get the folder count of a given group. |
bp-templates/bp-nouveau/includes/document/functions.php: bp_nouveau_document_localize_scripts() |
Localize the strings needed for the messages UI |
bp-templates/bp-nouveau/includes/groups/functions.php: bp_nouveau_groups_messages_localize_scripts() |
Localize the strings needed for the Group’s Message UI. |
bp-media/bp-media-functions.php: bp_media_get_total_group_album_count() |
Get the album count of a given group. |
bp-groups/bp-groups-functions.php: groups_get_membership_requested_user_ids() |
Get an array of group IDs to which a user has requested membership. |
bp-groups/bp-groups-filters.php: bp_groups_filter_document_scope() |
Set up document arguments for use with the ‘groups’ scope. |
bp-groups/bp-groups-filters.php: bp_groups_filter_folder_scope() | |
bp-groups/bp-groups-activity.php: bp_groups_get_activity_group() |
Get the group object the activity belongs to. |
bp-forums/groups.php: BBP_Forums_Group_Extension::topic_parent() | |
bp-forums/groups.php: BBP_Forums_Group_Extension::new_forum() |
Creating a group forum or category (including root for group) |
bp-forums/groups.php: BBP_Forums_Group_Extension::remove_forum() |
Removing a group forum or category (including root for group) |
bp-forums/groups.php: BBP_Forums_Group_Extension::display_forums() |
Output the forums for a group in the edit screens |
bp-forums/groups.php: BBP_Forums_Group_Extension::edit_screen_save() |
Save the Group Forum data on edit |
bp-forums/common/template.php: bbp_get_the_content() |
Return a textarea or TinyMCE if enabled |
bp-forums/functions.php: bbp_remove_group_id_from_all_forums() |
Remove a group from aall forums |
bp-forums/functions.php: bbp_group_is_admin() |
Is the current user an admin of the current group |
bp-forums/functions.php: bbp_group_is_mod() |
Is the current user a moderator of the current group |
bp-forums/functions.php: bbp_group_is_member() |
Is the current user a member of the current group |
bp-forums/functions.php: bbp_group_is_banned() |
Is the current user banned from the current group |
bp-forums/functions.php: bbp_group_is_creator() |
Is the current user the creator of the current group |
bp-forums/functions.php: bbp_remove_forum_id_from_group() |
Remove a forum from a group |
bp-forums/functions.php: bbp_get_group_forum_ids() |
Get forum ID’s for a group |
bp-forums/functions.php: bbp_update_group_forum_ids() |
Get forum ID’s for a group |
bp-forums/functions.php: bbp_add_group_id_to_forum() |
Add a group to a forum |
bp-forums/functions.php: bbp_add_forum_id_to_group() |
Remove a forum from a group |
bp-forums/functions.php: bbp_remove_group_id_from_forum() |
Remove a group from a forum |
bp-forums/replies/functions.php: bbp_adjust_forum_role_labels() |
Change forum role labels to conform to BuddyBoss Platform naming conventions |
bp-media/bp-media-template.php: bp_has_albums() |
Initialize the album loop. |
bp-media/bp-media-template.php: bp_has_media() |
Initialize the media loop. |
bp-media/bp-media-functions.php: bp_media_get_total_group_media_count() |
Get the media count of a given group. |
bp-groups/screens/single/admin/group-cover-image.php: groups_screen_group_admin_cover_image() |
Handle the display of a group’s Change cover photo page. |
bp-groups/screens/single/admin/group-settings.php: groups_screen_group_admin_settings() |
Handle the display of a group’s admin/group-settings page. |
bp-groups/screens/single/admin/group-avatar.php: groups_screen_group_admin_avatar() |
Handle the display of a group’s Change Avatar page. |
bp-groups/screens/single/admin/membership-requests.php: groups_screen_group_admin_requests() |
Handle the display of Admin > Membership Requests. |
bp-groups/screens/single/invite.php: groups_remove_group_invite() |
Process group invitation removal requests. |
bp-groups/actions/feed.php: groups_action_group_feed() |
Load the activity feed for the current group. |
bp-groups/actions/create.php: groups_action_create_group() |
Catch and process group creation form submissions. |
bp-groups/actions/leave-group.php: groups_action_leave_group() |
Catch and process “Leave Group” button clicks. |
bp-groups/classes/class-bp-group-extension.php: BP_Group_Extension::get_group_id() |
Get the current group ID. |
bp-groups/classes/class-bp-groups-theme-compat.php: BP_Groups_Theme_Compat::single_template_hierarchy() |
Add custom template hierarchy to theme compat for group pages. |
bp-groups/classes/class-bp-groups-invite-template.php: BP_Groups_Invite_Template::__construct() |
BP_Groups_Invite_Template constructor. |
bp-groups/classes/class-bp-groups-membership-requests-template.php: BP_Groups_Membership_Requests_Template::__construct() |
Constructor method. |
bp-groups/classes/class-bp-groups-group-members-template.php: BP_Groups_Group_Members_Template::__construct() |
Constructor. |
bp-groups/classes/class-bp-groups-component.php: BP_Groups_Component::setup_nav() |
Set up component navigation. |
bp-groups/bp-groups-functions.php: groups_accept_all_pending_membership_requests() |
Accept all pending membership requests to a group. |
bp-groups/bp-groups-functions.php: groups_avatar_upload_dir() |
Generate the avatar upload directory path for a given group. |
bp-groups/bp-groups-functions.php: groups_get_group_members() |
Fetch the members of a group. |
bp-groups/bp-groups-functions.php: groups_edit_base_group_details() |
Edit the base details for a group. |
bp-groups/bp-groups-template.php: bp_current_group_id() |
Echoes the output of bp_get_current_group_id(). |
bp-groups/bp-groups-template.php: bp_group_has_invites() |
Whether or not there are invites. |
bp-groups/bp-groups-template.php: bp_group_has_membership_requests() |
Initialize a group membership request template loop. |
bp-groups/bp-groups-template.php: bp_get_group_current_avatar() |
Returns the current group avatar. |
bp-groups/bp-groups-template.php: bp_get_group_has_avatar() |
Return whether a group has an avatar. |
bp-groups/bp-groups-template.php: bp_get_new_group_avatar() |
Return the avatar for the group currently being created |
bp-groups/bp-groups-template.php: bp_get_group_member_joined_since() |
Return the joined date for the current member in the group member loop. |
bp-groups/bp-groups-template.php: bp_get_group_member_section_title() |
Return the group member section header while in the groups members loop. |
bp-groups/bp-groups-template.php: bp_group_has_members() |
Initialize a group member query loop. |
bp-groups/bp-groups-template.php: bp_get_parent_group_id() |
Get the parent group ID for a specific group. |
bp-groups/bp-groups-template.php: bp_get_possible_parent_groups() |
Get an array of possible parent group ids for a specific group and user. |
bp-groups/bp-groups-template.php: bp_get_descendent_groups() |
Get all groups that are descendants of a specific group. |
bp-groups/bp-groups-template.php: bp_groups_user_can_send_invites() |
Can a user send invitations in the specified group? |
bp-groups/bp-groups-template.php: bp_get_group_type_list() |
Return a comma-delimited list of group types. |
bp-groups/bp-groups-template.php: bp_has_groups() |
Start the Groups Template Loop. |
bp-groups/bp-groups-filters.php: bp_groups_user_can_filter() |
Filter the bp_user_can value to determine what the user can do with regards to a specific group. |
bp-templates/bp-nouveau/includes/activity/ajax.php: bp_nouveau_ajax_post_update() |
Processes Activity updates received via a POST request. |
bp-templates/bp-nouveau/includes/activity/functions.php: bp_nouveau_activity_localize_scripts() |
Localize the strings needed for the Activity Post form UI |
bp-templates/bp-nouveau/includes/media/functions.php: bp_nouveau_media_localize_scripts() |
Localize the strings needed for the messages UI |
bp-templates/bp-nouveau/includes/groups/template-tags.php: bp_nouveau_group_type_checked() |
Output “checked” attribute to determine if the group type should be checked. |
bp-templates/bp-nouveau/includes/groups/ajax.php: bp_nouveau_ajax_send_group_invites() |
AJAX send group invite. |
bp-templates/bp-nouveau/includes/groups/ajax.php: bp_nouveau_ajax_remove_group_invite() |
AJAX remove group invite. |
bp-templates/bp-nouveau/includes/groups/functions.php: bp_nouveau_group_activity_widget_overrides() |
Filter the Latest activities Widget to only keep the one of the group displayed |
bp-templates/bp-nouveau/includes/groups/functions.php: bp_nouveau_group_groups_widget_overrides() |
Filter the Groups widget to only keep the displayed group. |
bp-templates/bp-nouveau/includes/groups/functions.php: bp_nouveau_get_group_potential_invites() |
Get potential group invites. |
bp-templates/bp-nouveau/includes/groups/functions.php: bp_nouveau_groups_localize_scripts() |
Localize the strings needed for the Group’s Invite UI |
bp-templates/bp-nouveau/includes/groups/functions.php: bp_nouveau_prepare_group_potential_invites_for_js() |
Prepare list of group invites for JS. |
bp-templates/bp-nouveau/includes/template-tags.php: bp_nouveau_get_nav_count() |
Retrieve the count attribute for the current nav item. |
bp-templates/bp-nouveau/includes/template-tags.php: bp_nouveau_nav_has_count() |
Checks if the nav item has a count attribute. |
bp-core/bp-core-template.php: bp_get_the_body_class() |
Customize the body class, according to the currently displayed BP content. |
bp-core/classes/class-bp-attachment-cover-image.php: BP_Attachment_Cover_Image::script_data() |
Build script datas for the Uploader UI. |
bp-core/classes/class-bp-attachment-avatar.php: BP_Attachment_Avatar::get_group_id() |
Get the group id to set its avatar. |
bp-core/bp-core-attachments.php: bp_attachments_get_group_has_cover_image() |
Does the group has a cover photo? |
bp-core/bp-core-attachments.php: bp_attachments_cover_image_ajax_upload() |
Ajax Upload and set a cover photo |
bp-core/bp-core-attachments.php: bp_attachments_cover_image_upload_dir() |
Gets the upload dir array for cover photos. |
bp-core/bp-core-avatars.php: bp_avatar_ajax_upload() |
Ajax upload an avatar. |
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.