Changeset 7983 for trunk/bp-groups/bp-groups-template.php
- Timestamp:
- 02/25/2014 02:45:49 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-template.php
r7978 r7983 3148 3148 3149 3149 function bp_group_has_invites( $args = '' ) { 3150 global $ bp, $invites_template, $group_id;3150 global $invites_template, $group_id; 3151 3151 3152 3152 $defaults = array( … … 3156 3156 3157 3157 $r = wp_parse_args( $args, $defaults ); 3158 extract( $r, EXTR_SKIP ); 3159 3160 if ( !$group_id ) { 3161 // Backwards compatibility 3162 if ( !empty( $bp->groups->current_group ) ) 3163 $group_id = $bp->groups->current_group->id; 3164 3165 if ( !empty( $bp->groups->new_group_id ) ) 3166 $group_id = $bp->groups->new_group_id; 3167 } 3168 3169 if ( !$group_id ) 3158 3159 if ( empty( $r['group_id'] ) ) { 3160 if ( ! empty( buddypress()->groups->current_group ) ) { 3161 $r['group_id'] = bp_get_current_group_id(); 3162 } else if ( ! empty( buddypress()->groups->new_group_id ) ) { 3163 $r['group_id'] = buddypress()->groups->new_group_id; 3164 } 3165 } 3166 3167 // Set the global (for use in BP_Groups_Invite_Template::the_invite()) 3168 if ( empty( $group_id ) ) { 3169 $group_id = $r['group_id']; 3170 } 3171 3172 if ( ! $group_id ) { 3170 3173 return false; 3171 3172 $invites_template = new BP_Groups_Invite_Template( $user_id, $group_id ); 3174 } 3175 3176 $invites_template = new BP_Groups_Invite_Template( $r['user_id'], $r['group_id'] ); 3173 3177 return apply_filters( 'bp_group_has_invites', $invites_template->has_invites(), $invites_template ); 3174 3178 }
Note: See TracChangeset
for help on using the changeset viewer.