Skip to content

Commit

Permalink
A placeholder for backup codes as well
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparsd committed Jan 9, 2025
1 parent f7ac59b commit ea5dbcb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion providers/class-two-factor-backup-codes.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,14 @@ public static function codes_remaining_for_user( $user ) {
*/
public function authentication_page( $user ) {
require_once ABSPATH . '/wp-admin/includes/template.php';

$code_placeholder = str_repeat( '0', self::NUMBER_OF_CODES );

?>
<p class="two-factor-prompt"><?php esc_html_e( 'Enter a recovery code.', 'two-factor' ); ?></p><br/>
<p>
<label for="authcode"><?php esc_html_e( 'Recovery Code:', 'two-factor' ); ?></label>
<input type="text" inputmode="numeric" name="two-factor-backup-code" id="authcode" class="input authcode" value="" size="20" pattern="[0-9 ]*" placeholder="1234 5678" autocomplete="one-time-code" data-digits="8" />
<input type="text" inputmode="numeric" name="two-factor-backup-code" id="authcode" class="input authcode" value="" size="20" pattern="[0-9 ]*" placeholder="<?php echo esc_attr( $code_placeholder ); ?>" data-digits="<?php esc_attr( self::NUMBER_OF_CODES ); ?>" />
</p>
<?php
submit_button( __( 'Submit', 'two-factor' ) );
Expand Down

0 comments on commit ea5dbcb

Please sign in to comment.