bp_get_current_group_id()
Returns the ID of the current group.
Return #Return
(int) $current_group_id The id of the current group, if there is one.
Source #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 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 ); }
Expand full source code Collapse full source code View on Trac
Related #Related
Uses #Uses
Uses | Description |
---|---|
bp-groups/bp-groups-template.php: bp_get_current_group_id |
Filters the ID of the current group. |
bp-groups/bp-groups-functions.php: groups_get_current_group() |
Get the BP_Groups_Group object corresponding to the current group. |
Used By #Used By
Used By | Description |
---|---|
bp-core/bp-core-avatars.php: bp_avatar_ajax_upload() |
Ajax upload an avatar. |
bp-core/classes/class-bp-attachment-avatar.php: BP_Attachment_Avatar::get_group_id() |
Get the group id to set its avatar. |
bp-core/classes/class-bp-attachment-cover-image.php: BP_Attachment_Cover_Image::script_data() |
Build script datas for the Uploader UI. |
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-attachments.php: bp_attachments_cover_image_ajax_upload() |
Ajax Upload and set a cover image |
bp-core/bp-core-attachments.php: bp_attachments_get_group_has_cover_image() |
Does the group has a cover image? |
bp-core/bp-core-attachments.php: bp_attachments_cover_image_upload_dir() |
Gets the upload dir array for cover images. |
bp-activity/bp-activity-template.php: bp_has_activities() |
Initialize the activity loop. |
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/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/ajax.php: bp_nouveau_ajax_send_group_invites() | |
bp-templates/bp-nouveau/includes/groups/ajax.php: bp_nouveau_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_groups_enqueue_scripts() |
Enqueue the groups scripts |
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() | |
bp-templates/bp-nouveau/includes/groups/functions.php: bp_nouveau_get_group_potential_invites() | |
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-legacy/buddypress-functions.php: bp_legacy_theme_post_update() |
Processes Activity updates received via a POST request. |
bp-groups/classes/class-bp-groups-membership-requests-template.php: BP_Groups_Membership_Requests_Template::__construct() |
Constructor method. |
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-group-extension.php: BP_Group_Extension::get_group_id() |
Get the current group ID. |
bp-groups/classes/class-bp-groups-group-members-template.php: BP_Groups_Group_Members_Template::__construct() |
Constructor. |
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_get_group_has_avatar() |
Return whether a group has an avatar. |
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_new_group_avatar() |
Return the avatar for the group currently being created |
bp-groups/bp-groups-template.php: bp_group_has_members() |
Initialize a group member query loop. |
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/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/send-invites.php: groups_remove_group_invite() |
Process group invitation removal requests. |
bp-groups/screens/single/admin/group-cover-image.php: groups_screen_group_admin_cover_image() |
Handle the display of a group’s Change cover image 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/admin/group-avatar.php: groups_screen_group_admin_avatar() |
Handle the display of a group’s Change Avatar 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/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-groups/bp-groups-activity.php: bp_groups_get_activity_group() |
Get the group object the activity belongs to. |
bp-groups/actions/leave-group.php: groups_action_leave_group() |
Catch and process “Leave Group” button clicks. |
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/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_get_membership_requested_user_ids() |
Get an array of group IDs to which a user has requested membership. |
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. |
Changelog #Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |