Contents
groups_get_current_group()
Get the BP_Groups_Group object corresponding to the current group.
Description
Return
(BP_Groups_Group) The current group object.
Source
File: bp-groups/bp-groups-functions.php
function groups_get_current_group() { $bp = buddypress(); $current_group = isset( $bp->groups->current_group ) ? $bp->groups->current_group : false; /** * Filters the BP_Groups_Group object corresponding to the current group. * * @since BuddyPress 1.5.0 * * @param BP_Groups_Group $current_group Current BP_Groups_Group object. */ return apply_filters( 'groups_get_current_group', $current_group ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.5.0 | Introduced. |
Related
Uses
Uses | Description |
---|---|
bp-loader.php: buddypress() |
The main function responsible for returning the one true BuddyBoss Instance to functions everywhere. |
bp-groups/bp-groups-functions.php: groups_get_current_group |
Filters the BP_Groups_Group object corresponding to the current group. |
Used By | Description |
---|---|
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::map_activity_to_group() |
Map a forum post to its corresponding group in the group activity stream. |
bp-forums/groups.php: BBP_Forums_Group_Extension::edit_redirect_to() |
Redirect to the group admin forum edit screen |
bp-forums/groups.php: BBP_Forums_Group_Extension::new_topic_redirect_to() |
Redirect to the group forum screen |
bp-forums/groups.php: BBP_Forums_Group_Extension::new_reply_redirect_to() |
Redirect to the group forum screen |
bp-groups/screens/single/admin/edit-details.php: groups_screen_group_admin_edit_details() |
Handle the display of a group’s admin/edit-details 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/manage-members.php: groups_screen_group_admin_manage_members() |
This function handles actions related to member management on the group admin. |
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_screen_group_invite() |
Handle the display of a group’s Send Invites page. |
bp-groups/screens/single/members.php: groups_screen_group_members() |
Handle the display of a group’s Members page. |
bp-groups/actions/access.php: bp_groups_group_access_protection() |
Protect access to single groups. |
bp-groups/actions/feed.php: groups_action_group_feed() |
Load the activity feed for the current group. |
bp-groups/screens/single/admin.php: groups_screen_group_admin() |
Handle the display of a group’s Admin pages. |
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::setup_display_hooks() |
Hook this extension’s group tab into BuddyPress, if necessary. |
bp-groups/classes/class-bp-group-extension.php: BP_Group_Extension::setup_edit_hooks() |
Hook this extension’s Edit panel into BuddyPress, if necessary. |
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-template.php: BP_Groups_Template::__construct() |
Constructor method. |
bp-groups/classes/class-bp-groups-group-members-template.php: BP_Groups_Group_Members_Template::__construct() |
Constructor. |
bp-groups/bp-groups-template.php: bp_get_groups_action_link() |
Get a URL for a group component action. |
bp-groups/bp-groups-template.php: bp_get_current_group_name() |
Returns the name of the current group. |
bp-groups/bp-groups-template.php: bp_get_current_group_description() |
Returns the description of the current group. |
bp-groups/bp-groups-template.php: bp_get_group_activity_feed_link() |
Return the current group activity-stream RSS URL. |
bp-groups/bp-groups-template.php: bp_get_current_group_id() |
Returns the ID of the current group. |
bp-groups/bp-groups-template.php: bp_get_current_group_slug() |
Returns the slug of the current group. |
bp-groups/bp-groups-template.php: bp_get_group_invite_user_remove_invite_url() |
Get cancel invite url for displayed member group invite in loop. |
bp-groups/bp-groups-template.php: bp_group_has_invites() |
Whether or not there are invites. |
bp-groups/bp-groups-template.php: bp_get_group_request_reject_link() |
Get the reject group membership link. |
bp-groups/bp-groups-template.php: bp_get_group_request_accept_link() |
Get the accept group membership link. |
bp-groups/bp-groups-template.php: bp_groups_get_front_template() |
Locate a custom group front template if it exists. |
bp-groups/bp-groups-template.php: bp_group_admin_tabs() |
HTML admin subnav items for group pages. |
bp-groups/bp-groups-template.php: bp_group_admin_tabs_backcompat() |
BackCompat for plugins/themes directly hooking groups_admin_tabs without using the Groups Extension API. |
bp-integrations/learndash/buddypress/components/BpGroupCourses.php: BpGroupCourses::tabLabel() |
Return the tab label with proper nonce |
bp-integrations/learndash/buddypress/components/BpGroupCourses.php: BpGroupCourses::showTabOnView() |
Determine who can see the tab |
bp-integrations/learndash/buddypress/components/BpGroupReports.php: BpGroupReports::showTabOnView() |
Determine who can see the tab |
bp-integrations/learndash/buddypress/Courses.php: Courses::showUserProgress() |
Output user course progress html |
bp-integrations/learndash/buddypress/Courses.php: Courses::getGroupCourses() |
Returns the courses belongs to the group |
bp-integrations/learndash/buddypress/Core.php: Core::subMenuLink() |
Returns the link to the selected sub menu |
bp-integrations/learndash/buddypress/Reports.php: Reports::getGroupUsersList() |
Get group’s member list for filter |
bp-integrations/learndash/buddypress/Reports.php: Reports::getGroupCoursesList() |
Get group’s course list for filter |
bp-integrations/learndash/buddypress/Reports.php: Reports::showReportUserStats() |
Output report user stats html |
bp-integrations/learndash/buddypress/Reports.php: Reports::showReportCourseStats() |
Output report course stats html |
bp-integrations/learndash/buddypress/Reports.php: Reports::forceOwnReportResults() |
Only allow non admin/mod to view his own reports |
bp-integrations/learndash/buddypress/Reports.php: Reports::removeCourseFilterIfOnlyOne() |
Remove the filter if only 1 option available |
bp-integrations/learndash/buddypress/Reports.php: Reports::removeUserFilterIfStudent() |
Remove user filter is nond admin/mod are viewing reports tab |
bp-integrations/learndash/buddypress/Reports.php: Reports::registerReportsScript() |
Add scripts when it’s on the reports page |
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/groups/template-tags.php: bp_nouveau_get_groups_buttons() |
Get the action buttons for the current group in the loop, or the current displayed group. |
bp-templates/bp-nouveau/includes/groups/functions.php: bp_nouveau_group_locate_template_part() |
Locate a single group template into a specific hierarchy. |
bp-templates/bp-nouveau/includes/groups/functions.php: bp_nouveau_group_setup_nav() |
Setup group invite navigation menu item. |
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-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/bp-core-template.php: bp_is_group() |
Does the current page belong to a single group? |
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.