Changeset 11896 for trunk/src/bp-groups/bp-groups-template.php
- Timestamp:
- 03/07/2018 12:56:49 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-template.php
r11828 r11896 468 468 469 469 /** 470 * Is the group visible to the currently logged-in user? 470 * Is the group accessible to the currently logged-in user? 471 * Despite the name of the function, it has historically checked 472 * whether a user has access to a group. 473 * In BP 2.9, a property was added to the BP_Groups_Group class, 474 * `is_visible`, that describes whether a user can know the group exists. 475 * If you wish to check that property, use the check: 476 * bp_current_user_can( 'groups_see_group' ). 471 477 * 472 478 * @since 1.0.0 … … 486 492 } 487 493 488 if ( ! empty( $group->is_visible ) ) { 489 return true; 490 } 491 492 return false; 494 return bp_current_user_can( 'groups_access_group', array( 'group_id' => $group->id ) ); 493 495 } 494 496
Note: See TracChangeset
for help on using the changeset viewer.