mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- fixed roles fields;
This commit is contained in:
@@ -2610,6 +2610,8 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
$options_pair = true;
|
||||
}
|
||||
|
||||
$options = $this->get_available_roles( $form_key, $options );
|
||||
|
||||
// add options
|
||||
if ( ! empty( $options ) ) {
|
||||
foreach ( $options as $k => $v ) {
|
||||
@@ -2929,11 +2931,6 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
$col_class = '';
|
||||
}
|
||||
|
||||
if ( $form_key == 'role' ) {
|
||||
$option_value = strtolower( str_replace( ' ', '-', $option_value ) );
|
||||
$option_value = in_array( $option_value, get_option( 'um_roles' ) ) ? 'um_' . $option_value : $option_value;
|
||||
}
|
||||
|
||||
if ($this->is_radio_checked( $key, $option_value, $data )) {
|
||||
$active = 'active';
|
||||
$class = "um-icon-android-radio-button-on";
|
||||
|
||||
@@ -1661,7 +1661,7 @@ if ( ! class_exists( 'um\core\User' ) ) {
|
||||
if ( ! in_array( $key, $this->update_user_keys ) ) {
|
||||
update_user_meta( $this->id, $key, $value );
|
||||
} else {
|
||||
$args[$key] = esc_attr( $changes['role_radio'] );
|
||||
$args[ $key ] = esc_attr( $changes[ $key ] );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user