admin-actions.php
18 hours ago
backup-codes-dialog.php
18 hours ago
card-backup.php
18 hours ago
card-setup.php
18 hours ago
confirm-dialogs.php
18 hours ago
index.php
18 hours ago
main.php
18 hours ago
summary.php
18 hours ago
totp-details.php
18 hours ago
summary.php
36 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Profile section: Currently configured summary. |
| 4 | * |
| 5 | * Shows the primary method and secondary (backup) methods. |
| 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 | ?> |
| 15 | <div class="wp2fa-profile__summary"> |
| 16 | <div class="wp2fa-profile__summary-row"> |
| 17 | <span class="wp2fa-profile__summary-label"><?php \esc_html_e( 'Primary Method:', 'wp-2fa' ); ?></span> |
| 18 | <span class="wp2fa-profile__summary-value"> |
| 19 | <?php echo \esc_html( $data['primary_label'] ); ?> |
| 20 | <?php if ( ! $data['has_enabled_methods'] && (int) $data['user_id'] === (int) \get_current_user_id() ) : ?> |
| 21 | <a href="#" class="wp2fa-profile__configure-now-link" data-wp2fa-open-wizard data-user-id="<?php echo \esc_attr( (string) $data['user_id'] ); ?>"><?php \esc_html_e( 'Configure Now.', 'wp-2fa' ); ?></a> |
| 22 | <?php endif; ?> |
| 23 | </span> |
| 24 | </div> |
| 25 | <div class="wp2fa-profile__summary-row"> |
| 26 | <span class="wp2fa-profile__summary-label"><?php \esc_html_e( 'Secondary Method(s):', 'wp-2fa' ); ?></span> |
| 27 | <span class="wp2fa-profile__summary-value"> |
| 28 | <?php if ( $data['has_enabled_methods'] ) : ?> |
| 29 | <?php echo \esc_html( $data['backup_methods_label'] ); ?> |
| 30 | <?php else : ?> |
| 31 | <?php \esc_html_e( 'No enabled secondary methods', 'wp-2fa' ); ?> |
| 32 | <?php endif; ?> |
| 33 | </span> |
| 34 | </div> |
| 35 | </div> |
| 36 |