Skip to content

Commit

Permalink
Connections: Use utility function to determine group site privacy sta…
Browse files Browse the repository at this point in the history
…tus.
  • Loading branch information
boonebgorges committed Jul 31, 2023
1 parent a21e122 commit 59599b3
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,7 @@

$current_group_type_label = openlab_get_group_type_label( [ 'case' => 'upper' ] );

$current_group_site_id = openlab_get_site_id_by_group_id( bp_get_current_group_id() );
$current_group_site_status = 'public';
if ( $current_group_site_id ) {
$blog_public = (int) get_blog_option( $current_group_site_id, 'blog_public' );
if ( $blog_public < -1 ) {
$current_group_site_status = 'private';
}
}
$current_group_site_status = OpenLab\Connections\Util::group_has_public_site( bp_get_current_group_id() ) ? 'public' : 'private';

Check failure on line 13 in wp-content/themes/openlab/buddypress/groups/single/connections/index.php

View workflow job for this annotation

GitHub Actions / phpstan

Call to an undefined static method OpenLab\Connections\Util::group_has_public_site().

switch ( $current_group_site_status ) {
case 'private' :
Expand Down

0 comments on commit 59599b3

Please sign in to comment.