From bb96a02bf2f86c904b579b2c265587fe23ff7ecf Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Fri, 28 Apr 2023 15:49:32 +1000 Subject: [PATCH] Simplify UI Text / more consistent text and UI. (#521) * Replace strings with more user-friendly wordings. * Hide the Language dropdown when we're on a 2FA page. See #520 * Try an alternative simpler login UI for the 'Or continue with...' buttons. * Try using a GitHub-style 'Having Problems?' + list style. * Rename backup codes to 'Recovery Codes', to dissuade their regular use. --- class-two-factor-core.php | 63 +++++-------------- providers/class-two-factor-backup-codes.php | 41 +++++++----- providers/class-two-factor-email.php | 9 +++ providers/class-two-factor-fido-u2f.php | 9 +++ providers/class-two-factor-provider.php | 15 +++++ providers/class-two-factor-totp.php | 24 ++++--- .../class-two-factor-backup-codes.php | 4 +- tests/providers/class-two-factor-totp.php | 2 +- 8 files changed, 94 insertions(+), 73 deletions(-) diff --git a/class-two-factor-core.php b/class-two-factor-core.php index df61c3eb..0b814f3b 100644 --- a/class-two-factor-core.php +++ b/class-two-factor-core.php @@ -734,6 +734,9 @@ public static function login_html( $user, $login_nonce, $redirect_to, $error_msg include_once TWO_FACTOR_DIR . 'includes/function.login-header.php'; } + // Disable the language switcher. + add_filter( 'login_display_language_dropdown', '__return_false' ); + login_header(); if ( ! empty( $error_msg ) ) { @@ -756,45 +759,12 @@ public static function login_html( $user, $login_nonce, $redirect_to, $error_msg authentication_page( $user ); ?> - - 'validate_2fa', - 'provider' => $backup_provider_key, - 'wp-auth-id' => $user->ID, - 'wp-auth-nonce' => $login_nonce, - 'redirect_to' => $redirect_to, - 'rememberme' => $rememberme, - ) - ); - ?> +
-

- - get_label() - ) - ); - ?> - +

+

-
- -
-

- - - -

-
+