diff --git a/core/functions.php b/core/functions.php index 58a8b02..1d2579e 100644 --- a/core/functions.php +++ b/core/functions.php @@ -403,7 +403,19 @@ public function get_displayed_user_groups_projects() { $db = TaskBreaker::wpdb(); $user_id = bp_displayed_user_id(); - $user_groups = groups_get_user_groups( $user_id ); + + // Bail out when buddypress groups components is not installed/activated. + if ( ! function_exists('groups_get_user_groups') ) { + return array( + 'projects' => [], + 'total' => 0, + 'total_pages' => 1, + 'total_user_groups' => 0, + 'summary' => 'BP_GROUPS_COMPONENT_NOT_INSTALLED', + ); + } else { + $user_groups = groups_get_user_groups( $user_id ); + } if ( empty( $user_groups['groups'] ) ) { $user_groups['groups'] = array( 0 ); diff --git a/templates/project-single.php b/templates/project-single.php index 00186e3..d14ac01 100644 --- a/templates/project-single.php +++ b/templates/project-single.php @@ -13,6 +13,13 @@ if ( ! defined( 'ABSPATH' ) ) { return; } + +if ( ! function_exists('bp_is_active') ) { + echo '
- +