PluginProbe
Two Factor Authentication / 1.13.0
Two Factor Authentication v1.13.0
1.12.2 1.13.0 1.14.10 1.14.11 1.14.14 1.14.15 1.14.16 1.14.17 1.14.23 1.14.24 1.14.26 1.14.27 1.14.3 1.14.4 1.14.5 1.14.7 1.14.8 1.15.5 1.16.0 1.2.10 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 All 98 releases
two-factor-authentication / templates / user-settings.php

user-settings.php in Two Factor Authentication 1.13.0, at templates/user-settings.php

62 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if (!defined('ABSPATH')) die('Access denied.');
4
5 global $current_user;
6 $totp_controller = $simba_tfa->get_totp_controller();
7
8 ?>
9 <style>
10 #icon-tfa-plugin {
11 background: transparent url('<?php print plugin_dir_url(__FILE__); ?>img/tfa_admin_icon_32x32.png' ) no-repeat;
12 }
13 .inside > h3, .normal {
14 cursor: default;
15 margin-top: 20px;
16 }
17 </style>
18 <div class="wrap">
19
20 <h2><?php echo __('Two Factor Authentication', 'two-factor-authentication').' '.__('Settings', 'two-factor-authentication'); ?></h2>
21
22 <?php
23
24 if (!empty($totp_controller->were_settings_saved())) {
25 echo '<div class="updated notice is-dismissible">'."<p><strong>".__('Settings saved.', 'two-factor-authentication')."</strong></p></div>";
26 }
27
28 $simba_tfa->include_template('settings-intro-notices.php');
29
30 ?>
31
32 <form method="post" action="<?php print esc_url(add_query_arg('settings-updated', 'true', $_SERVER['REQUEST_URI'])); ?>">
33
34 <?php wp_nonce_field('tfa_activate', '_tfa_activate_nonce', false, true); ?>
35
36 <h2><?php _e('Activate two factor authentication', 'two-factor-authentication'); ?></h2>
37 <p>
38 <?php
39 $utc_date = gmdate('Y-m-d H:i:s');
40 $date_now = get_date_from_gmt($utc_date, 'Y-m-d H:i:s');
41 echo sprintf(__('N.B. Getting your TFA app/device to generate the correct code depends upon a) you first setting it up by entering or scanning the code below into it, and b) upon your web-server and your TFA app/device agreeing upon the UTC time (within a minute or so). The current UTC time according to the server when this page loaded: %s, and in the time-zone you have configured in your WordPress settings: %s', 'two-factor-authentication'), htmlspecialchars($utc_date), htmlspecialchars($date_now));
42 ?>
43 </p>
44 <p>
45 <?php
46 $simba_tfa->paint_enable_tfa_radios($current_user->ID);
47 ?></p>
48 <?php submit_button(); ?>
49 </form>
50
51 <?php
52
53 $totp_controller->current_codes_box();
54
55 $totp_controller->advanced_settings_box();
56
57 do_action('simba_tfa_user_settings_after_advanced_settings');
58
59 ?>
60
61 </div>
62