PluginProbe
Two Factor Authentication / 1.12.2
Two Factor Authentication v1.12.2
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 / includes / admin_settings.php

admin_settings.php in Two Factor Authentication 1.12.2, at includes/admin_settings.php

189 lines 9.4 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
9 <h1><?php echo sprintf(__('Two Factor Authentication (Version: %s) - Admin Settings', 'two-factor-authentication'), $simba_two_factor_authentication->version); ?> </h1>
10
11 <?php
12 if (!class_exists('Simba_Two_Factor_Authentication_Premium')) {
13 ?>
14 <a href="https://www.simbahosting.co.uk/s3/product/two-factor-authentication/"><?php _e("Premium version", 'two-factor-authentication');?></a> |
15 <?php
16 }
17 ?>
18 <a href="<?php echo apply_filters('simba_tfa_support_url', 'https://wordpress.org/support/plugin/two-factor-authentication/');?>"><?php _e("Support", 'two-factor-authentication');?></a> |
19 <a href="https://profiles.wordpress.org/davidanderson#content-plugins"><?php _e('More free plugins', 'two-factor-authentication');?></a> |
20 <a href="http://updraftplus.com">UpdraftPlus - <?php _e('WordPress backups', 'two-factor-authentication'); ?></a> |
21 <a href="https://www.simbahosting.co.uk/s3/shop/"><?php _e('More premium plugins', 'two-factor-authentication');?></a> |
22 <a href="https://twitter.com/updraftplus"><?php _e('Twitter', 'two-factor-authentication');?></a> |
23
24 <a href="http://david.dw-perspective.org.uk"><?php _e("Lead developer's homepage", 'two-factor-authentication');?></a>
25 <br>
26
27 </div>
28
29 <?php if (defined('TWO_FACTOR_DISABLE') && TWO_FACTOR_DISABLE) { ?>
30 <div class="error">
31 <h3><?php _e('Two Factor Authentication currently disabled', 'two-factor-authentication');?></h3>
32 <p>
33 <?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'); ?>
34 </p>
35 </div>
36 <?php } ?>
37
38 <div style="max-width:800px;">
39
40 <?php
41 if (is_multisite()) {
42 if (is_super_admin()) {
43 ?>
44 <p style="font-size: 120%; font-weight: bold;">
45 <?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');?>
46 </p>
47 <?php
48 } else {
49 // Should not be possible to reach this; but an extra check does not hurt.
50 die('Security check');
51 }
52 }
53 ?>
54
55 <form method="post" action="options.php" style="margin-top: 12px">
56 <?php settings_fields('tfa_user_roles_group'); ?>
57 <h2><?php _e('User roles', 'two-factor-authentication'); ?></h2>
58 <?php _e('Choose which user roles will have two factor authentication available.', 'two-factor-authentication'); ?>
59 <p>
60 <?php $simba_two_factor_authentication->list_user_roles_checkboxes(); ?>
61 </p>
62 <?php submit_button(); ?>
63 </form>
64
65 <hr>
66
67 <h2><?php _e('Make two factor authentication compulsory', 'two-factor-authentication'); ?></h2>
68
69 <?php
70
71 $output = '<p><a href="https://www.simbahosting.co.uk/s3/product/two-factor-authentication/">'.__('Requiring users to use two-factor authentication is a feature of the Premium version of this plugin.', 'two-factor-authentication').'</a><p>';
72 echo apply_filters('simba_tfa_after_user_roles', $output);
73
74 ?>
75
76 <hr>
77 <h2><?php _e('Trusted devices', 'two-factor-authentication'); ?></h2>
78
79 <form method="post" action="options.php" style="margin-top: 12px">
80 <?php settings_fields('tfa_user_roles_trusted_group'); ?>
81 <?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'); ?>
82
83 <?php
84 $output = '<p><a href="https://www.simbahosting.co.uk/s3/product/two-factor-authentication/">'.__('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>';
85 echo apply_filters('simba_tfa_trusted_devices_config', $output);
86 ?>
87
88 </form>
89
90 <div>
91 <hr>
92 <form method="post" action="options.php" style="margin-top: 40px">
93 <?php
94 settings_fields('tfa_xmlrpc_status_group');
95 ?>
96 <h2><?php _e('XMLRPC requests', 'two-factor-authentication'); ?></h2>
97 <?php
98
99 echo '<p>';
100 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');
101 echo '</p><p>';
102
103 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');
104 echo '</p><p>';
105
106 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');
107 echo '</p>';
108
109 ?>
110 <p>
111 <?php $simba_two_factor_authentication->tfa_list_xmlrpc_status_radios(); ?>
112 </p>
113 <?php submit_button(); ?>
114 </form>
115 </div>
116
117 <div id="simba-tfa-admin-settings-algorithm">
118 <hr>
119 <form method="post" action="options.php" style="margin-top: 40px">
120 <?php
121 settings_fields('simba_tfa_default_hmac_group');
122 ?>
123 <h2><?php _e('Default algorithm', 'two-factor-authentication'); ?></h2>
124 <?php _e('Your users can change this in their own settings if they want.', 'two-factor-authentication'); ?>
125 <p>
126 <?php
127 $totp_controller->print_default_hmac_radios();
128 ?></p>
129 <?php submit_button(); ?>
130 </form>
131 </div>
132
133 <hr>
134
135 <?php
136 if (function_exists('WC')) {
137
138 ?>
139 <br><br>
140 <h2><?php _e("WooCommerce integration", 'two-factor-authentication'); ?></h2>
141 <p>
142 <?php echo apply_filters('simba_tfa_settings_woocommerce', '<a href="https://www.simbahosting.co.uk/s3/product/two-factor-authentication/">'.__('The Premium version of this plugin allows you to add a configuration tab for users in the WooCommerce "My account" area.', 'two-factor-authentication').'</a>'); ?>
143 </p>
144 <hr>
145 <?php } ?>
146
147 <br><br>
148 <h2><?php _e("Users' settings", 'two-factor-authentication'); ?></h2>
149 <p>
150
151 <?php
152 if (!class_exists('Simba_Two_Factor_Authentication_Premium')) { ?>
153
154 <a href="https://www.simbahosting.co.uk/s3/product/two-factor-authentication/"><?php _e("The Premium version of this plugin allows you to see and reset the TFA settings of other users.", 'two-factor-authentication'); ?></a>
155
156 <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>
157
158 <?php } ?>
159
160 <?php do_action('simba_tfa_users_settings'); ?>
161
162 <hr>
163 <?php if (!class_exists('Simba_Two_Factor_Authentication_Premium')) { ?>
164 <h2><?php _e('Premium version', 'two-factor-authentication'); ?></h2>
165 <p>
166 <a href="https://www.simbahosting.co.uk/s3/product/two-factor-authentication/"><?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>
167 </p>
168 <p>
169 <ul style="list-style: disc inside;">
170 <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>
171 <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>
172 <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>
173 <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>
174 <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>
175 <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>
176 </ul>
177 </p>
178 <hr>
179 <?php } ?>
180
181 <h2><?php _e('Translations', 'two-factor-authentication'); ?></h2>
182 <p>
183 <?php echo sprintf(__("If you want to translate this plugin, please go to %s", 'two-factor-authentication'), '<a href="https://translate.wordpress.org/projects/wp-plugins/two-factor-authentication/">'.__('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'); ?>
184 <br>
185 </p>
186
187 </div>
188 </div>
189