Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions providers/class-two-factor-totp.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,20 @@ public function user_two_factor_options( $user ) {
$key = $this->generate_key();
$totp_url = $this->generate_qr_code_url( $user, $key );

$datetime = wp_date( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ) );
$tz_display = wp_timezone_string();
?>
<p class="two-factor-server-datetime"
data-server-epoch="<?php echo esc_attr( time() ); ?>">
<?php
/* translators: 1: server date and time, 2: timezone. */
printf(
esc_html__( 'Your server date and time is %1$s (%2$s). Please verify this is correct to ensure TOTP will work.', 'two-factor' ),
esc_html( $datetime ),
esc_html( $tz_display )
);
?>
</p>
<p>
<?php esc_html_e( 'Please scan the QR code or manually copy the shared secret key from below to your Authenticator app:', 'two-factor' ); ?>
</p>
Expand Down