153 | | <?php bp_group_admin_memberlist( true ) ?> |
| 162 | |
| 163 | <?php if ( bp_has_members( '&include='. $admin_ids . '') ) : ?> |
| 164 | |
| 165 | <ul id="admins-list" class="item-list single-line>"> |
| 166 | |
| 167 | <?php while ( bp_members() ) : bp_the_member(); ?> |
| 168 | <li> |
| 169 | <?php echo bp_core_fetch_avatar( array( 'item_id' => $admin->user_id, 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) ?> |
| 170 | <h5> |
| 171 | <a href="<?php bp_member_permalink(); ?>"> <?php bp_member_name(); ?></a> |
| 172 | <span class="small"> |
| 173 | <a class="button confirm admin-demote-to-member" href="<?php bp_group_member_demote_link($admin->user_id) ?>"><?php _e( 'Demote to Member', 'buddypress' ) ?></a> |
| 174 | </span> |
| 175 | </h5> |
| 176 | </li> |
| 177 | <?php endwhile; ?> |
| 178 | |
| 179 | </ul> |
| 180 | |
| 181 | <?php endif; ?> |
| 182 | |
157 | | |
158 | | <div class="bp-widget"> |
159 | | <h4><?php _e( 'Moderators', 'buddypress' ) ?></h4> |
160 | | <?php bp_group_mod_memberlist( true ) ?> |
| 186 | |
| 187 | <?php |
| 188 | $mods = groups_get_group_mods( bp_get_group_id() ); |
| 189 | $mod_ids = array(); |
| 190 | foreach($mods as $mod){ |
| 191 | $mod_ids[] = $mod->user_id; |
| 192 | } |
| 193 | $mod_ids = implode(',', $mod_ids); |
| 194 | ?> |
| 195 | |
| 196 | <div class="bp-widget"> |
| 197 | <h4><?php _e( 'Moderators', 'buddypress' ) ?></h4> |
| 198 | |
| 199 | <?php if ( bp_has_members( '&include='. $mod_ids . '') ) : ?> |
| 200 | <ul id="mods-list" class="item-list"> |
| 201 | |
| 202 | <?php while ( bp_members() ) : bp_the_member(); ?> |
| 203 | <li> |
| 204 | <?php echo bp_core_fetch_avatar( array( 'item_id' => $mod->user_id, 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => __( 'Profile picture of %s', 'buddypress' ) ) ) ?> |
| 205 | <h5> |
| 206 | <a href="<?php bp_member_permalink(); ?>"> <?php bp_member_name(); ?></a> |
| 207 | <span class="small"> |
| 208 | <a href="<?php bp_group_member_promote_admin_link( array( 'user_id' => $mod->user_id ) ) ?>" class="button confirm mod-promote-to-admin" title="<?php _e( 'Promote to Admin', 'buddypress' ); ?>"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a> |
| 209 | <a class="button confirm mod-demote-to-member" href="<?php bp_group_member_demote_link($mod->user_id) ?>"><?php _e( 'Demote to Member', 'buddypress' ) ?></a> |
| 210 | </span> |
| 211 | </h5> |
| 212 | </li> |
| 213 | <?php endwhile; ?> |
| 214 | |
| 215 | </ul> |
| 216 | |
| 217 | <?php endif; ?> |
| 218 | |