mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-12 11:16:35 +09:00
- fixed issue with not editable fields and their visibility;
This commit is contained in:
@@ -1936,10 +1936,6 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if ( ! um_can_edit_field( $data ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
um_fetch_user( $_um_profile_id );
|
||||
|
||||
// Stop return empty values build field attributes:
|
||||
@@ -1960,6 +1956,14 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty( $this->editing ) && $this->set_mode == 'profile' ) {
|
||||
if ( ! UM()->roles()->um_user_can( 'can_edit_everyone' ) ) {
|
||||
if ( isset( $data['editable'] ) && $data['editable'] == 0 ) {
|
||||
$disabled = ' disabled="disabled" ';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$disabled = apply_filters( 'um_is_field_disabled', $disabled, $data );
|
||||
|
||||
if ( ! isset( $data['autocomplete'] ) ) {
|
||||
|
||||
Reference in New Issue
Block a user