Skip to:
Content

BuddyPress.org

Ticket #5510: 5510.patch

File 5510.patch, 1.3 KB (added by hnla, 7 years ago)

New template tag & update home screen message

  • bp-groups/bp-groups-template.php

     
    16361636        return apply_filters( 'bp_group_is_user_banned', groups_is_user_banned( $user_id, $group->id ) );
    16371637}
    16381638
     1639        function bp_user_has_invite() {
     1640                global $groups_template;
     1641                        if( $groups_template->group->is_invited ) :
     1642                                return true;
     1643                        else:
     1644                                return false;
     1645                        endif;
     1646        }
     1647
    16391648function bp_group_accept_invite_link() {
    16401649        echo bp_get_group_accept_invite_link();
    16411650}
     
    19341943
    19351944        if ( 'private' == $group->status ) {
    19361945                if ( ! bp_group_has_requested_membership() ) {
    1937                         if ( is_user_logged_in() )
     1946                        if ( is_user_logged_in() && !$group->is_invited )
    19381947                                $message = __( 'This is a private group and you must request group membership in order to join.', 'buddypress' );
     1948
     1949                        elseif( is_user_logged_in() && $group->is_invited )
     1950                                $message = __( 'This is a private group, you have been invited to join this group though. Please use the accept button above to join', 'buddypress' );
     1951
    19391952                        else
    19401953                                $message = __( 'This is a private group. To join you must be a registered site member and request group membership.', 'buddypress' );
    19411954