admin-actions.php
19 hours ago
backup-codes-dialog.php
19 hours ago
card-backup.php
19 hours ago
card-setup.php
19 hours ago
confirm-dialogs.php
19 hours ago
index.php
19 hours ago
main.php
19 hours ago
summary.php
19 hours ago
totp-details.php
19 hours ago
admin-actions.php
45 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Profile section: Admin-only actions. |
| 4 | * |
| 5 | * Shown when an admin views another user's profile. |
| 6 | * Reset 2FA, temporary removal, unlock account. |
| 7 | * |
| 8 | * @var array $data Template data from the renderer. |
| 9 | * |
| 10 | * @package wp2fa |
| 11 | * @since 4.0.0 |
| 12 | */ |
| 13 | |
| 14 | defined( 'ABSPATH' ) || exit; |
| 15 | $admin = $data['admin_actions_data']; |
| 16 | ?> |
| 17 | <div class="wp2fa-profile__admin-actions"> |
| 18 | <h4 class="wp2fa-profile__admin-title"><?php \esc_html_e( 'Admin Actions', 'wp-2fa' ); ?></h4> |
| 19 | |
| 20 | <?php if ( ! empty( $admin['description'] ) ) : ?> |
| 21 | <p class="wp2fa-profile__admin-desc"><?php echo \esc_html( $admin['description'] ); ?></p> |
| 22 | <?php endif; ?> |
| 23 | |
| 24 | <?php if ( ! empty( $admin['reset_url'] ) ) : ?> |
| 25 | <a href="<?php echo \esc_url( $admin['reset_url'] ); ?>" class="wp2fa-profile__btn wp2fa-profile__btn--primary"> |
| 26 | <?php \esc_html_e( 'Reset 2FA configuration', 'wp-2fa' ); ?> |
| 27 | </a> |
| 28 | <?php endif; ?> |
| 29 | |
| 30 | <?php if ( ! empty( $admin['temp_remove_url'] ) ) : ?> |
| 31 | <button type="button" |
| 32 | class="wp2fa-profile__btn wp2fa-profile__btn--secondary" |
| 33 | data-wp2fa-confirm="temp-remove" |
| 34 | data-href="<?php echo \esc_url( $admin['temp_remove_url'] ); ?>"> |
| 35 | <?php \esc_html_e( 'Remove 2FA temporary', 'wp-2fa' ); ?> |
| 36 | </button> |
| 37 | <?php endif; ?> |
| 38 | |
| 39 | <?php if ( ! empty( $admin['unlock_url'] ) ) : ?> |
| 40 | <a href="<?php echo \esc_url( $admin['unlock_url'] ); ?>" class="wp2fa-profile__btn wp2fa-profile__btn--secondary"> |
| 41 | <?php \esc_html_e( 'Unlock user and reset the grace period', 'wp-2fa' ); ?> |
| 42 | </a> |
| 43 | <?php endif; ?> |
| 44 | </div> |
| 45 |