- fixed editable attribute base on the legacy code;

- if `editable` attribute  doesn't exist then we set `editable` to true by default;
This commit is contained in:
Mykyta Synelnikov
2023-09-05 01:12:16 +03:00
parent 10467d12ce
commit e5b8ff400e
5 changed files with 20 additions and 9 deletions
@@ -2383,6 +2383,11 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
$this->edit_mode_value = true;
}
// Set to true if `editable` doesn't exist (legacy case). It will be saved to DB as `true` after the first field update.
if ( null === $this->edit_mode_value ) {
$this->edit_mode_value = true;
}
if ( empty( $this->edit_mode_value ) ) {
$this->edit_mode_value = false;
}