From e90efd0983eca0ba42fee838fa226b8ada563404 Mon Sep 17 00:00:00 2001 From: ashubawork <43743394+ashubawork@users.noreply.github.com> Date: Wed, 22 Dec 2021 10:44:27 +0200 Subject: [PATCH] - fixed editing upload fields (issue #958) --- includes/admin/core/class-admin-metabox.php | 2 +- includes/core/class-fields.php | 113 ++++++++++++-------- 2 files changed, 69 insertions(+), 46 deletions(-) diff --git a/includes/admin/core/class-admin-metabox.php b/includes/admin/core/class-admin-metabox.php index 19c8b181..e6ee0d17 100644 --- a/includes/admin/core/class-admin-metabox.php +++ b/includes/admin/core/class-admin-metabox.php @@ -2364,7 +2364,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
+
edit_mode_value || $this->edit_mode_value ) ?> />
diff --git a/includes/core/class-fields.php b/includes/core/class-fields.php index 0e6343b1..57e528af 100644 --- a/includes/core/class-fields.php +++ b/includes/core/class-fields.php @@ -2730,39 +2730,54 @@ if ( ! class_exists( 'um\core\Fields' ) ) { } else { $img = ''; } - $output .= '' . __( 'Change photo', 'ultimate-member' ) . ''; + $output .= ''; + if ( empty( $disabled ) ) { + $output .= '' . __( 'Change photo', 'ultimate-member' ) . ''; + } + + } else { - $output .= '' . $button_text . ''; + $output .= ''; + if ( empty( $disabled ) ) { + $output .= '' . $button_text . ''; + } + } $output .= '