admin-actions.php
20 hours ago
backup-codes-dialog.php
20 hours ago
card-backup.php
20 hours ago
card-setup.php
20 hours ago
confirm-dialogs.php
20 hours ago
index.php
20 hours ago
main.php
20 hours ago
summary.php
20 hours ago
totp-details.php
20 hours ago
card-setup.php
46 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Profile section: 2FA Setup card. |
| 4 | * |
| 5 | * Contains buttons for configuring/changing 2FA and optionally removing it. |
| 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 | $setup = $data['setup_card_data']; |
| 15 | ?> |
| 16 | <div class="wp2fa-profile__card" id="wp2fa-setup-card"> |
| 17 | <h4 class="wp2fa-profile__card-title"><?php \esc_html_e( '2FA Setup', 'wp-2fa' ); ?></h4> |
| 18 | <div class="wp2fa-profile__btn-group"> |
| 19 | <?php if ( $setup['show_change_btn'] ) : ?> |
| 20 | <button type="button" |
| 21 | class="wp2fa-profile__btn wp2fa-profile__btn--primary" |
| 22 | data-wp2fa-open-wizard |
| 23 | data-user-id="<?php echo \esc_attr( (string) $data['user_id'] ); ?>"> |
| 24 | <?php echo \esc_html( $setup['change_label'] ); ?> |
| 25 | </button> |
| 26 | <?php endif; ?> |
| 27 | |
| 28 | <?php if ( $setup['show_configure_btn'] ) : ?> |
| 29 | <button type="button" |
| 30 | class="wp2fa-profile__btn wp2fa-profile__btn--primary" |
| 31 | data-wp2fa-open-wizard |
| 32 | data-user-id="<?php echo \esc_attr( (string) $data['user_id'] ); ?>"> |
| 33 | <?php echo \esc_html( $setup['configure_label'] ); ?> |
| 34 | </button> |
| 35 | <?php endif; ?> |
| 36 | |
| 37 | <?php if ( $setup['show_remove_btn'] ) : ?> |
| 38 | <button type="button" |
| 39 | class="wp2fa-profile__btn wp2fa-profile__btn--secondary" |
| 40 | data-wp2fa-confirm="remove-2fa"> |
| 41 | <?php \esc_html_e( 'Remove 2FA', 'wp-2fa' ); ?> |
| 42 | </button> |
| 43 | <?php endif; ?> |
| 44 | </div> |
| 45 | </div> |
| 46 |