Skip to:
Content

BuddyPress.org

Ticket #4785: 4785.05.patch

File 4785.05.patch, 787 bytes (added by dcavins, 7 years ago)

Don't show site admins every possible tab.

  • src/bp-groups/bp-groups-classes.php

    diff --git src/bp-groups/bp-groups-classes.php src/bp-groups/bp-groups-classes.php
    index 7507e79..2e96640 100644
    class BP_Group_Extension { 
    34693469         * @return bool
    34703470         */
    34713471        public function user_can_see_nav_item( $user_can_see_nav_item = false ) {
    3472                 if ( current_user_can( 'bp_moderate' ) ) {
     3472                if ( $this->params['access'] != 'noone' && current_user_can( 'bp_moderate' ) ) {
    34733473                        return true;
    34743474                }
    34753475
    class BP_Group_Extension { 
    34843484         * @return bool
    34853485         */
    34863486        public function user_can_visit( $user_can_visit = false ) {
    3487                 if ( current_user_can( 'bp_moderate' ) ) {
     3487                if ( $this->params['show_tab'] != 'noone' && current_user_can( 'bp_moderate' ) ) {
    34883488                        return true;
    34893489                }
    34903490