Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/16/2011 08:08:45 PM (14 years ago)
Author:
boonebgorges
Message:

Adds toggle for who can send group invitations, in order to make the option more consistent and configurable throughout BP. Fixes #2005. Props DJPaul for help cleaning up the patches.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-loader.php

    r4518 r4524  
    339339            );
    340340
    341             if ( is_user_logged_in() && groups_is_user_member( $bp->loggedin_user->id, $this->current_group->id ) ) {
    342                 if ( bp_is_active( 'friends' ) ) {
    343                     $sub_nav[] = array(
    344                         'name'            => __( 'Send Invites', 'buddypress' ),
    345                         'slug'            => 'send-invites',
    346                         'parent_url'      => $group_link,
    347                         'parent_slug'     => $this->current_group->slug,
    348                         'screen_function' => 'groups_screen_group_invite',
    349                         'item_css_id'     => 'invite',
    350                         'position'        => 70,
    351                         'user_has_access' => $this->current_group->user_has_access
    352                     );
    353                 }
     341            if ( bp_is_active( 'friends' ) && bp_groups_user_can_send_invites() ) {
     342                $sub_nav[] = array(
     343                    'name'            => __( 'Send Invites', 'buddypress' ),
     344                    'slug'            => 'send-invites',
     345                    'parent_url'      => $group_link,
     346                    'parent_slug'     => $this->current_group->slug,
     347                    'screen_function' => 'groups_screen_group_invite',
     348                    'item_css_id'     => 'invite',
     349                    'position'        => 70,
     350                    'user_has_access' => $this->current_group->user_has_access
     351                );
    354352            }
    355353
Note: See TracChangeset for help on using the changeset viewer.