Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/07/2018 12:56:49 PM (4 years ago)
Author:
dcavins
Message:

Revert bp_group_is_visible() to check access.

In r11761, bp_group_is_visible() was changed to rely on the BP_Groups_Group->is_visible property. However, bp_group_is_visible() has been used to check access, not visibility, making the new logic, even though it seems sensible, wrong.

This changeset also replaces bp_group_is_visible() in the BP Nouveau template parts, to start retiring this no-longer-correctly-named function.

Props r-a-y.

See #7608.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/groups/template-tags.php

    r11856 r11896  
    11541154    $bp_is_group_home = bp_is_group_home();
    11551155
    1156     if ( $bp_is_group_home && ! bp_group_is_visible() ) {
     1156    if ( $bp_is_group_home && ! bp_current_user_can( 'groups_access_group' ) ) {
    11571157        /**
    11581158         * Fires before the display of the group status message.
Note: See TracChangeset for help on using the changeset viewer.