',
- sprintf(
- __( 'To update your Two-Factor options, you must first revalidate your session.', 'two-factor' ) .
- ' ' . __( 'Revalidate now', 'two-factor' ) . '',
+ $notices['warning two-factor-warning-revalidate-session'] = sprintf(
+ esc_html__( 'To update your Two-Factor options, you must first revalidate your session.', 'two-factor' ) .
+ ' ' . esc_html__( 'Revalidate now', 'two-factor' ) . '',
esc_url( $url )
- )
);
}
@@ -1821,20 +1823,19 @@ public static function user_two_factor_options( $user ) {
$show_2fa_options ? '' : 'disabled="disabled"'
);
- $notices = [];
- if ( empty( $enabled_providers ) ) {
- $notices[] = __( 'Configure a primary two-factor method along with a backup method, such as Recovery Codes, to avoid being locked out if you lose access to your primary method.', 'two-factor' );
- } elseif ( 1 === count( $enabled_providers ) ) {
- $notices['warning'] = __( 'To prevent being locked out of your account, consider enabling a backup method like Recovery Codes in case you lose access to your primary authentication method.', 'two-factor' );
+ if ( 1 === count( $enabled_providers ) ) {
+ $notices['warning two-factor-warning-suggest-backup'] = esc_html__( 'To prevent being locked out of your account, consider enabling a backup method like Recovery Codes in case you lose access to your primary authentication method.', 'two-factor' );
}
-
?>
$notice ) : ?>