admin-actions.php
1 month ago
backup-codes-dialog.php
1 month ago
card-backup.php
1 month ago
card-setup.php
1 month ago
confirm-dialogs.php
1 month ago
index.php
1 month ago
main.php
1 month ago
summary.php
1 month ago
totp-details.php
1 month ago
totp-details.php
42 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Profile section: TOTP QR code details. |
| 4 | * |
| 5 | * Expandable section showing the TOTP QR code and manual key. |
| 6 | * |
| 7 | * @var array $data Template data from the renderer. |
| 8 | * |
| 9 | * @package wp2fa |
| 10 | * @since 4.0.0 |
| 11 | */ |
| 12 | |
| 13 | defined( 'ABSPATH' ) || exit; |
| 14 | $totp = $data['totp_data']; |
| 15 | ?> |
| 16 | <div class="wp2fa-profile__totp-details"> |
| 17 | <button type="button" |
| 18 | class="wp2fa-profile__totp-toggle" |
| 19 | data-wp2fa-toggle-totp |
| 20 | aria-expanded="false" |
| 21 | aria-controls="wp2fa-totp-qr-content"> |
| 22 | ▶ <?php \esc_html_e( 'Show QR code', 'wp-2fa' ); ?> |
| 23 | </button> |
| 24 | <div class="wp2fa-profile__totp-content" id="wp2fa-totp-qr-content"> |
| 25 | <img class="wp2fa-profile__totp-qr" |
| 26 | src="<?php echo ( $totp['qr_code_url'] ); ?>" |
| 27 | alt="<?php \esc_attr_e( 'TOTP QR Code', 'wp-2fa' ); ?>" /> |
| 28 | <div class="wp2fa-profile__totp-key-wrap"> |
| 29 | <input type="text" |
| 30 | class="wp2fa-profile__totp-key-input" |
| 31 | id="wp2fa-totp-key" |
| 32 | readonly |
| 33 | value="<?php echo \esc_attr( $totp['totp_key'] ); ?>" /> |
| 34 | <?php if ( \is_ssl() ) : ?> |
| 35 | <button type="button" |
| 36 | class="wp2fa-profile__copy-btn" |
| 37 | data-wp2fa-copy="#wp2fa-totp-key"><?php \esc_html_e( 'COPY', 'wp-2fa' ); ?></button> |
| 38 | <?php endif; ?> |
| 39 | </div> |
| 40 | </div> |
| 41 | </div> |
| 42 |