PluginProbe
Two Factor Authentication / 1.2.6
Two Factor Authentication v1.2.6
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
← All changes | includes/tfa_frontend.php +9 -9 1.2.131.2.6 View file →
@@ -53,9 +53,9 @@
53 53
54 54 //Make the algorithm information string easier to update
55 55 public function tfa_algorithm_info($algorithm_type) {
56 56 $al_type_disp = strtoupper($algorithm_type);
57 - $al_type_desc = ($algorithm_type == 'totp' ? __('a time based', 'two-factor-authentication') : __('an event based', 'two-factor-authentication'));
57 + $al_type_desc = ($algorithm_type == 'totp' ? __('a time based', SIMBA_TFA_TEXT_DOMAIN) : __('an event based', SIMBA_TFA_TEXT_DOMAIN));
58 58
59 59 return array('disp' => $al_type_disp, 'desc' => $al_type_desc);
60 60 }
61 61
@@ -81,15 +81,15 @@
81 81 return apply_filters('simba_tfa_fetch_assort_vars', array(
82 82 'url' => $url,
83 83 'tfa_priv_key_64' => $tfa_priv_key_64,
84 84 'tfa_priv_key' => $tfa_priv_key,
85 - 'emergency_str' => '<em>'.__('No emergency codes left. Sorry.', 'two-factor-authentication').'</em>',
85 + 'emergency_str' => '<em>'.__('No emergency codes left. Sorry.', SIMBA_TFA_TEXT_DOMAIN).'</em>',
86 86 'algorithm_type' => $algorithm_type
87 87 ), $tfa, $current_user);
88 88 }
89 89
90 90 public function save_settings_button() {
91 - echo '<button style="margin-left: 4px;margin-bottom: 10px" class="simbatfa_settings_save button button-primary">'.__('Save Settings', 'two-factor-authentication').'</button>';
91 + echo '<button style="margin-left: 4px;margin-bottom: 10px" class="simbatfa_settings_save button button-primary">'.__('Save Settings', SIMBA_TFA_TEXT_DOMAIN).'</button>';
92 92 }
93 93
94 94 private function get_tfa() {
95 95 if (empty($this->tfa)) $this->tfa = $this->mother->getTFA();
@@ -100,9 +100,9 @@
100 100 global $current_user;
101 101 ?>
102 102 <div class="simbatfa_frontend_settings_box tfa_settings_form">
103 103 <p><?php $this->mother->tfaListEnableRadios($current_user->ID, true); ?></p>
104 - <button style="margin-left: 4px;margin-bottom: 10px" class="button button-primary simbatfa_settings_save"><?php echo __('Save Settings', 'two-factor-authentication'); ?></button>
104 + <button style="margin-left: 4px;margin-bottom: 10px" class="button button-primary simbatfa_settings_save"><?php echo __('Save Settings', SIMBA_TFA_TEXT_DOMAIN); ?></button>
105 105 </div>
106 106 <?php
107 107 }
108 108
@@ -129,9 +129,9 @@
129 129
130 130 // Prevent accidental leaving if there are unsaved settings
131 131 window.onbeforeunload = function(e) {
132 132 if (tfa_query_leaving) {
133 - var ask = "<?php echo esc_js(__('You have unsaved settings.', 'two-factor-authentication')); ?>";
133 + var ask = "<?php echo esc_js(__('You have unsaved settings.', SIMBA_TFA_TEXT_DOMAIN)); ?>";
134 134 e.returnValue = ask;
135 135 return ask;
136 136 }
137 137 }
@@ -147,9 +147,9 @@
147 147
148 148 //Save Settings
149 149 $(".simbatfa_settings_save").click(function() {
150 150
151 - $.blockUI({ message: '<div style="margin: 8px;font-size:150%;"><?php echo esc_js(__('Saving...', 'two-factor-authentication' )); ?></div>' });
151 + $.blockUI({ message: '<div style="margin: 8px;font-size:150%;"><?php echo esc_js(__('Saving...', SIMBA_TFA_TEXT_DOMAIN )); ?></div>' });
152 152
153 153 // https://stackoverflow.com/questions/10147149/how-can-i-override-jquerys-serialize-to-include-unchecked-checkboxes
154 154 var formData = $(".tfa_settings_form input, .tfa_settings_form textarea, .tfa_settings_form select").serialize();
155 155
@@ -191,9 +191,9 @@
191 191
192 192 } catch(err) {
193 193 console.log(err);
194 194 console.log(response);
195 - <?php if (!isset($also_try)) { ?> alert("<?php echo esc_js(__('Response:', 'two-factor-authentication')); ?> "+response);<?php } ?>
195 + <?php if (!isset($also_try)) { ?> alert("<?php echo esc_js(__('Response:', 'SIMBA_TFA_TEXT_DOMAIN')); ?> "+response);<?php } ?>
196 196 }
197 197 <?php if (isset($also_try)) { ?>
198 198 if (!settings_saved) {
199 199 $.post('<?php echo esc_js($also_try);?>', {
@@ -222,9 +222,9 @@
222 222
223 223 } catch(err) {
224 224 console.log(err);
225 225 console.log(response);
226 - alert("<?php echo esc_js(__('Response:', 'two-factor-authentication')); ?> "+response);
226 + alert("<?php echo esc_js(__('Response:', 'SIMBA_TFA_TEXT_DOMAIN')); ?> "+response);
227 227 }
228 228 $.unblockUI();
229 229 });
230 230 } else {
@@ -253,9 +253,9 @@
253 253
254 254 $this->get_tfa();
255 255
256 256 if(!$this->tfa->isActivatedForUser($current_user->ID)){
257 - echo __('Two factor authentication is not available for your user.', 'two-factor-authentication');
257 + echo __('Two factor authentication is not available for your user.', SIMBA_TFA_TEXT_DOMAIN);
258 258 } else {
259 259
260 260 ?>
261 261