Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#PROD-8510 The group type with the setting to hide the groups from th… #4604

Open
wants to merge 2 commits into
base: release
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/bp-groups/bp-groups-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,9 @@ function bp_has_groups( $args = '' ) {
$args = bp_parse_args( $args, array() );
// Exclude Group Types
if (
( empty( $args['scope'] ) || ( ! empty( $args['scope'] ) && 'all' === $args['scope'] ) ) &&
! is_admin() && // Ensure it's only running on the frontend
! current_user_can( 'manage_options' ) && // Allow admins to see all groups on frontend
( wp_doing_ajax() || ( empty( $args['scope'] ) || ( ! empty( $args['scope'] ) && 'all' === $args['scope'] ) ) ) &&
! bp_is_user_groups() && ! bp_is_group_subgroups() &&
empty( $group_type )
) {
Expand Down