From 2d5ab45c014245062d38c79c3ed504a82f3636b8 Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Tue, 25 Jul 2023 12:42:39 +0300 Subject: [PATCH] - added "Show/hide password button" option; --- includes/admin/core/class-admin-settings.php | 9 +++++++++ includes/class-config.php | 1 + readme.txt | 1 + 3 files changed, 11 insertions(+) diff --git a/includes/admin/core/class-admin-settings.php b/includes/admin/core/class-admin-settings.php index d504b8c7..3a1bb03b 100644 --- a/includes/admin/core/class-admin-settings.php +++ b/includes/admin/core/class-admin-settings.php @@ -689,6 +689,9 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) { 'use_um_gravatar_default_image' => array( 'sanitize' => 'bool', ), + 'toggle_password' => array( + 'sanitize' => 'bool', + ), 'require_strongpass' => array( 'sanitize' => 'bool', ), @@ -1088,6 +1091,12 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) { 'tooltip' => __( 'Do you want to use the plugin default avatar instead of the gravatar default photo (If the user did not upload a custom profile photo / avatar)', 'ultimate-member' ), 'conditional' => array( 'use_um_gravatar_default_builtin_image', '=', 'default' ), ), + array( + 'id' => 'toggle_password', + 'type' => 'checkbox', + 'label' => __( 'Show/hide password button', 'ultimate-member' ), + 'tooltip' => __( 'Enable visibility for show/hide password button for the password field-type.', 'ultimate-member' ), + ), array( 'id' => 'require_strongpass', 'type' => 'checkbox', diff --git a/includes/class-config.php b/includes/class-config.php index 4e7eb202..d7ce85bb 100644 --- a/includes/class-config.php +++ b/includes/class-config.php @@ -520,6 +520,7 @@ if ( ! class_exists( 'um\Config' ) ) { 'use_gravatars' => 0, 'use_um_gravatar_default_builtin_image' => 'default', 'use_um_gravatar_default_image' => 0, + 'toggle_password' => false, 'require_strongpass' => 0, 'password_min_chars' => 8, 'password_max_chars' => 30, diff --git a/readme.txt b/readme.txt index cf76f648..1527a497 100644 --- a/readme.txt +++ b/readme.txt @@ -171,6 +171,7 @@ IMPORTANT: PLEASE UPDATE THE PLUGIN TO AT LEAST VERSION 2.6.7 IMMEDIATELY. VERSI * Enhancements: - Added: Compatibility with UM:Stripe extension + - Added: Show/hide password button for toggle password visibility * Bugfixes: