Changeset 3541 for trunk/bp-groups/bp-groups-templatetags.php
- Timestamp:
- 12/19/2010 12:29:04 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-templatetags.php
r3540 r3541 1024 1024 * 1025 1025 * If this function is invoked inside the groups template loop (e.g. the group directory), then 1026 * $groups_template->group->is_banned is set if the user is banned, so use that instead of making1027 * another SQL query.1026 * check $groups_template->group->is_banned instead of making another SQL query. 1027 * However, if used in a single group's pages, we must use groups_is_user_banned(). 1028 1028 * 1029 1029 * @global object $bp BuddyPress global settings … … 1034 1034 * @since 1.3 1035 1035 */ 1036 function bp_group_is_user_banned( $group = false, $user_id = false) {1036 function bp_group_is_user_banned( $group = false, $user_id = 0 ) { 1037 1037 global $bp, $groups_template; 1038 1038 … … 1044 1044 $group =& $groups_template->group; 1045 1045 1046 if ( !$user_id && !empty( $group->is_banned ) )1047 return apply_filters( 'bp_group_is_ member_banned', true);1046 if ( !$user_id && isset( $group->is_banned ) ) 1047 return apply_filters( 'bp_group_is_user_banned', $group->is_banned ); 1048 1048 } 1049 1049
Note: See TracChangeset
for help on using the changeset viewer.