bp_group_mod_memberlist( bool $admin_list = false, bool $group = false )

Generate the HTML for a list of group moderators.

Description

No longer used.

Parameters

$admin_list

(Optional)

Default value: false

$group

(Optional)

Default value: false

Source

File: bp-groups/bp-groups-template.php

3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
function bp_group_mod_memberlist( $admin_list = false, $group = false ) {
    global $groups_template;
 
    if ( empty( $group ) ) {
        $group =& $groups_template->group;
    }
 
    if ( $group_mods = groups_get_group_mods( $group->id ) ) { ?>
 
        <ul id="mods-list" class="item-list<?php if ( $admin_list ) { ?> single-line<?php } ?>">
 
        <?php foreach ( (array) $group_mods as $mod ) { ?>
 
            <?php if ( !empty( $admin_list ) ) { ?>
 
            <li>
 
                <?php echo bp_core_fetch_avatar( array( 'item_id' => $mod->user_id, 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile photo of %s', 'buddyboss' ), bp_core_get_user_displayname( $mod->user_id ) ) ) ) ?>
 
                <h5>
                    <?php echo bp_core_get_userlink( $mod->user_id ); ?>
 
                    <span class="small">
                        <a href="<?php bp_group_member_promote_admin_link( array( 'user_id' => $mod->user_id ) ) ?>" class="button confirm mod-promote-to-admin"><?php _e( 'Promote to co-organizer', 'buddyboss' ); ?></a>
                        <a class="button confirm mod-demote-to-member" href="<?php bp_group_member_demote_link($mod->user_id) ?>"><?php _e( 'Demote to member', 'buddyboss' ) ?></a>
                    </span>
                </h5>
            </li>
 
            <?php } else { ?>
 
            <li>
 
                <?php echo bp_core_fetch_avatar( array( 'item_id' => $mod->user_id, 'type' => 'thumb', 'alt' => sprintf( __( 'Profile photo of %s', 'buddyboss' ), bp_core_get_user_displayname( $mod->user_id ) ) ) ) ?>
 
                <h5><?php echo bp_core_get_userlink( $mod->user_id ) ?></h5>
 
                <span class="activity"><?php echo bp_core_get_last_activity( strtotime( $mod->date_modified ), __( 'joined %s', 'buddyboss') ); ?></span>
 
                <?php if ( bp_is_active( 'friends' ) ) : ?>
 
                    <div class="action">
                        <?php bp_add_friend_button( $mod->user_id ) ?>
                    </div>
 
                <?php endif; ?>
 
            </li>
 
            <?php } ?>
        <?php } ?>
 
        </ul>
 
    <?php } else { ?>
 
        <div id="message" class="info">
            <p><?php _e( 'This group has no moderators', 'buddyboss' ); ?></p>
        </div>
 
    <?php }
}

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.