PluginProbe
Two Factor Authentication / 1.14.14
Two Factor Authentication v1.14.14
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 / simba-tfa / templates / admin-settings.php

admin-settings.php in Two Factor Authentication 1.14.14, at simba-tfa/templates/admin-settings.php

186 lines 9.8 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 ?><div class="wrap">
6
7 <div>
8 <h1><?php echo esc_html(empty($settings_page_heading) ? __('Two Factor Authentication - Admin Settings', 'two-factor-authentication') : $settings_page_heading); ?></h1>
9 <?php
10 if (!empty($admin_settings_links) && is_array($admin_settings_links)) {
11 echo implode(' | ', array_map(function($val) {
12 return '<a href="'.esc_url($val['url']).'">' . esc_html($val['title']) . '</a>';
13 }, $admin_settings_links));
14 echo '<br>';
15 }
16 ?>
17 </div>
18
19 <?php if (defined('TWO_FACTOR_DISABLE') && TWO_FACTOR_DISABLE) { ?>
20 <div class="error">
21 <h3><?php _e('Two Factor Authentication currently disabled', 'two-factor-authentication');?></h3>
22 <p>
23 <?php _e('Two factor authentication is currently disabled via the TWO_FACTOR_DISABLE constant (which is mostly likely to be defined in your wp-config.php)', 'two-factor-authentication'); ?>
24 </p>
25 </div>
26 <?php } ?>
27
28 <div style="max-width:800px;">
29
30 <?php
31 if (is_multisite()) {
32 if (is_super_admin()) {
33 ?>
34 <p style="font-size: 120%; font-weight: bold;">
35 <?php _e('N.B. These two-factor settings apply to your entire WordPress network. (i.e. They are not localised to one particular site).', 'two-factor-authentication');?>
36 </p>
37 <?php
38 } else {
39 // Should not be possible to reach this; but an extra check does not hurt.
40 die('Security check');
41 }
42 }
43 ?>
44
45 <form method="post" action="options.php" style="margin-top: 12px">
46 <?php settings_fields('tfa_user_roles_group'); ?>
47 <h2><?php _e('Make two factor authentication available', 'two-factor-authentication'); ?></h2>
48 <?php _e('Choose which user roles will have two factor authentication available.', 'two-factor-authentication'); ?>
49 <p>
50 <?php $simba_tfa->list_user_roles_checkboxes(); ?>
51 </p>
52 <?php submit_button(); ?>
53 </form>
54
55 <hr>
56
57 <div class="tfa-premium">
58 <h2><?php _e('Make two factor authentication compulsory', 'two-factor-authentication'); ?></h2>
59
60 <?php
61
62 $output = '<p><a href="'.esc_url($simba_tfa->get_premium_version_url()).'">'.__('Requiring users to use two-factor authentication is a feature of the Premium version of this plugin.', 'two-factor-authentication').'</a><p>';
63 echo apply_filters('simba_tfa_after_user_roles', $output);
64
65 ?>
66
67 <hr>
68 <h2><?php _e('Trusted devices', 'two-factor-authentication'); ?></h2>
69
70 <form method="post" action="options.php" style="margin-top: 12px">
71 <?php settings_fields('tfa_user_roles_trusted_group'); ?>
72 <?php _e('Choose which user roles are permitted to mark devices they login on as trusted. This feature requires browser cookies and an https (i.e. SSL) connection to the website to work.', 'two-factor-authentication'); ?>
73
74 <?php
75 $output = '<p><a href="'.esc_url($simba_tfa->get_premium_version_url()).'">'.__('Allowing users to mark a device as trusted so that a two-factor code is only needed once in a specified number of days (instead of every login) is a feature of the Premium version of this plugin.', 'two-factor-authentication').'</a><p>';
76 echo apply_filters('simba_tfa_trusted_devices_config', $output);
77 ?>
78 </form>
79 </div>
80 </form>
81
82 <div>
83 <hr>
84 <form method="post" action="options.php" style="margin-top: 40px">
85 <?php
86 settings_fields('tfa_xmlrpc_status_group');
87 ?>
88 <h2><?php _e('XMLRPC requests', 'two-factor-authentication'); ?></h2>
89 <?php
90
91 echo '<p>';
92 echo __("XMLRPC is a feature within WordPress allowing other computers to talk to your WordPress install. For example, it could be used by an app on your tablet that allows you to blog directly from the app (instead of needing the WordPress dashboard).", 'two-factor-authentication');
93 echo '</p><p>';
94
95 echo __("Unfortunately, XMLRPC also provides a way for attackers to perform actions on your WordPress site, using only a password (i.e. without a two-factor password). More unfortunately, authors of legitimate programmes using XMLRPC have not yet added two-factor support to their code.", 'two-factor-authentication');
96 echo '</p><p>';
97
98 echo __("i.e. XMLRPC requests coming in to WordPress (whether from a legitimate app, or from an attacker) can only be verified using the password - not with a two-factor code. As a result, there not be an ideal option to pick below. You may have to choose between the convenience of using your apps, or the security of two factor authentication.", 'two-factor-authentication');
99 echo '</p>';
100
101 ?>
102 <p>
103 <?php $simba_tfa->tfa_list_xmlrpc_status_radios(); ?>
104 </p>
105 <?php submit_button(); ?>
106 </form>
107 </div>
108
109 <div id="simba-tfa-admin-settings-algorithm">
110 <hr>
111 <form method="post" action="options.php" style="margin-top: 40px">
112 <?php settings_fields('simba_tfa_default_hmac_group'); ?>
113 <h2><?php _e('Default algorithm for codes generated by user devices', 'two-factor-authentication'); ?></h2>
114 <?php _e('Your users can change this in their own settings if they want.', 'two-factor-authentication'); ?>
115 <p>
116 <?php
117 $totp_controller->print_default_hmac_radios();
118 ?></p>
119 <?php submit_button(); ?>
120 </form>
121 </div>
122
123 <hr>
124
125 <?php
126 if (function_exists('WC')) {
127
128 ?>
129 <br><br>
130 <h2><?php _e("WooCommerce integration", 'two-factor-authentication'); ?></h2>
131 <p>
132 <?php echo apply_filters('simba_tfa_settings_woocommerce', '<a href="'.esc_url($simba_tfa->get_premium_version_url()).'">'.__('The Premium version of this plugin allows you to add a configuration tab for users in the WooCommerce "My account" area, and anti-bot protection on the WooCommerce login form.', 'two-factor-authentication').'</a>'); ?>
133 </p>
134 <hr>
135 <?php } ?>
136
137 <br>
138
139 <div class="tfa-premium">
140 <br>
141 <h2><?php _e("Users' settings", 'two-factor-authentication'); ?></h2>
142 <p>
143
144 <?php
145 if (!class_exists('Simba_Two_Factor_Authentication_Premium')) { ?>
146
147 <a href="<?php echo esc_url($simba_tfa->get_premium_version_url()); ?>"><?php _e("The Premium version of this plugin allows you to see and reset the TFA settings of other users.", 'two-factor-authentication'); ?></a>
148
149 <a href="https://wordpress.org/plugins/user-switching/"><?php _e('Another way to do that is by using a user-switching plugin like this one.', 'two-factor-authentication'); ?></a>
150
151 <?php } ?>
152
153 <?php do_action('simba_tfa_users_settings'); ?>
154
155 <hr>
156 <?php if (!class_exists('Simba_Two_Factor_Authentication_Premium')) { ?>
157 <h2><?php _e('Premium version', 'two-factor-authentication'); ?></h2>
158 <p>
159 <a href="<?php echo esc_url($simba_tfa->get_premium_version_url()); ?>"><?php _e("If you want to say 'thank you' or help this plugin's development, or get extra features, then please take a look at the premium version of this plugin.", 'two-factor-authentication'); ?></a> <?php _e('It comes with these extra features:', 'two-factor-authentication');?><br>
160 </p>
161 <p>
162 <ul style="list-style: disc inside;">
163 <li><strong><?php _e('Emergency codes', 'two-factor-authentication');?></strong> - <?php _e('provide your users with one-time codes to use in case they lose their device.', 'two-factor-authentication');?></li>
164 <li><strong><?php _e('Make TFA compulsory', 'two-factor-authentication');?></strong> - <?php _e('require your users to set up TFA to be able to log in, after an optional grace period.', 'two-factor-authentication');?></li>
165 <li><strong><?php _e('Trusted devices', 'two-factor-authentication');?></strong> - <?php _e('allow privileged (or all) users to mark a device as trusted and thereby only needing to supply a TFA code upon login every so-many days (e.g. every 30 days) instead of on each login.', 'two-factor-authentication');?></li>
166 <li><strong><?php _e('Manage all users centrally', 'two-factor-authentication');?></strong> - <?php _e('enable, disable or see TFA codes for all your users from one central location.', 'two-factor-authentication');?></li>
167 <li><strong><?php _e('More shortcodes', 'two-factor-authentication');?></strong> - <?php _e('flexible shortcodes allowing you to design your front-end settings page for your users exactly as you wish.', 'two-factor-authentication');?></li>
168 <li><strong><?php _e('More WooCommerce features', 'two-factor-authentication');?></strong> - <?php _e('automatically add TFA settings in the WooCommerce account settings, and WooCommerce login form bot protection.', 'two-factor-authentication');?></li>
169 <li><strong><?php _e('Elementor support', 'two-factor-authentication');?></strong> - <?php _e('adds support for Elementor login forms.', 'two-factor-authentication');?></li>
170 <li><strong><?php _e('Any-form support', 'two-factor-authentication');?></strong> - <?php _e('adds support for any login form from any plugin via appending your TFA code onto the end of your password.', 'two-factor-authentication');?></li>
171 <li><strong><?php _e('Personal support', 'two-factor-authentication');?></strong> - <?php _e('access to our personal support desk for 12 months.', 'two-factor-authentication');?></li>
172 </ul>
173 </p>
174 <hr>
175 <?php } ?>
176 </div>
177
178 <h2><?php _e('Translations', 'two-factor-authentication'); ?></h2>
179 <p>
180 <?php echo sprintf(__("If you want to translate this plugin, please go to %s", 'two-factor-authentication'), '<a href="'.esc_url($simba_tfa->get_plugin_translate_url()).'">'.__('the wordpress.org translation website.', 'two-factor-authentication').'</a>').' '.__("Don't send us the translation file directly - plugin authors do not have access to the wordpress.org translation system (local language teams do).", 'two-factor-authentication'); ?>
181 <br>
182 </p>
183
184 </div>
185 </div>
186