Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/06/2017 03:46:07 PM (9 years ago)
Author:
djpaul
Message:

Groups: use class methods to check if user has visibility of a group.

Improves upon existing duplication of logic.

Fixes #7608

Props dcavins

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-template.php

    r11703 r11761  
    486486        }
    487487
    488         if ( 'public' == $group->status ) {
     488        if ( ! empty( $group->is_visible ) ) {
    489489                return true;
    490         } else {
    491                 if ( groups_is_user_member( bp_loggedin_user_id(), $group->id ) ) {
    492                         return true;
    493                 }
    494490        }
    495491
Note: See TracChangeset for help on using the changeset viewer.