Changeset 8411 for trunk/src/bp-groups/bp-groups-template.php
- Timestamp:
- 05/10/2014 02:03:21 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-template.php
r8397 r8411 1626 1626 1627 1627 /** 1628 * Check whether the current user has an outstanding invite to the current group in the loop. 1629 * 1630 * @param object $group Optional. Group data object. Defaults to the current 1631 * group in the groups loop. 1632 * @return bool True if the user has an outstanding invite, otherwise false. 1633 */ 1634 function bp_group_is_invited( $group = false ) { 1635 global $groups_template; 1636 1637 if ( empty( $group ) ) { 1638 $group =& $groups_template->group; 1639 } 1640 1641 return apply_filters( 'bp_group_is_invited', ! empty( $group->is_invited ) ); 1642 } 1643 1644 /** 1628 1645 * Checks if a user is banned from a group. 1629 1646 * … … 1956 1973 if ( 'private' == $group->status ) { 1957 1974 if ( ! bp_group_has_requested_membership() ) { 1958 if ( is_user_logged_in() ) 1975 if ( is_user_logged_in() && bp_group_is_invited() ) { 1976 $message = __( 'You must accept your pending invitation before you can access this private group.', 'buddypress' ); 1977 } else if ( is_user_logged_in() ) { 1959 1978 $message = __( 'This is a private group and you must request group membership in order to join.', 'buddypress' ); 1960 else1979 } else { 1961 1980 $message = __( 'This is a private group. To join you must be a registered site member and request group membership.', 'buddypress' ); 1981 } 1962 1982 1963 1983 } else {
Note: See TracChangeset
for help on using the changeset viewer.