Skip to:
Content

BuddyPress.org

Ticket #9097: 9097.patch

File 9097.patch, 1.3 KB (added by vapvarun, 6 months ago)

9097 patch

  • src/bp-members/classes/class-bp-members-admin.php

    diff --git a/src/bp-members/classes/class-bp-members-admin.php b/src/bp-members/classes/class-bp-members-admin.php
    index 717d8109c..f1b6b4a32 100644
    a b class BP_Members_Admin { 
    14911491                $types        = bp_get_member_types( array(), 'objects' );
    14921492                $current_type = (array) bp_get_member_type( $user->ID, false );
    14931493                $types_count  = count( array_filter( $current_type ) );
     1494                $disabled     = ! current_user_can( 'administrator' ) ? 'disabled="disabled"' : '';
    14941495                ?>
    14951496
    14961497                <label for="bp-members-profile-member-type" class="screen-reader-text">
    class BP_Members_Admin { 
    15031504                        <?php foreach ( $types as $type ) : ?>
    15041505                                <li>
    15051506                                        <label class="selectit">
    1506                                                 <input value="<?php echo esc_attr( $type->name ) ?>" name="bp-members-profile-member-type[]" type="checkbox" <?php checked( true, in_array( $type->name, $current_type ) ); ?>>
     1507                                                <input value="<?php echo esc_attr( $type->name ) ?>" name="bp-members-profile-member-type[]" type="checkbox" <?php checked( true, in_array( $type->name, $current_type ) ); ?> <?php echo esc_attr( $disabled ); ?>>
    15071508                                                <?php echo esc_html( $type->labels['singular_name'] ); ?>
    15081509                                        </label>
    15091510                                </li>