mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-15 20:53:39 +09:00
- standardize the condition for checking not editable fields to empty( $data['editable']
This commit is contained in:
@@ -3597,7 +3597,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
$class = 'um-icon-android-radio-button-off';
|
||||
}
|
||||
|
||||
if ( isset( $data['editable'] ) && 0 === $data['editable'] ) {
|
||||
if ( empty( $data['editable'] ) ) {
|
||||
$col_class .= ' um-field-radio-state-disabled';
|
||||
}
|
||||
|
||||
@@ -3716,7 +3716,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
$class = 'um-icon-android-checkbox-outline-blank';
|
||||
}
|
||||
|
||||
if ( isset( $data['editable'] ) && 0 === $data['editable'] ) {
|
||||
if ( empty( $data['editable'] ) ) {
|
||||
$col_class .= ' um-field-radio-state-disabled';
|
||||
}
|
||||
|
||||
|
||||
@@ -1663,7 +1663,7 @@ function um_can_edit_field( $data ) {
|
||||
$can_edit = false;
|
||||
} else {
|
||||
if ( ! UM()->roles()->um_user_can( 'can_edit_everyone' ) ) {
|
||||
if ( isset( $data['editable'] ) && $data['editable'] == 0 ) {
|
||||
if ( empty( $data['editable'] ) ) {
|
||||
$can_edit = false;
|
||||
} else {
|
||||
if ( ! um_is_user_himself() ) {
|
||||
|
||||
Reference in New Issue
Block a user