PluginProbe
Loginizer / 2.1.1
Loginizer v2.1.1
2.1.1 2.1.0 2.0.9 2.0.8 1.9.8 1.9.9 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 trunk 1.0 1.0.1 1.0.2 1.1.0 1.1.1 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 All 75 releases
← All changes | main/settings/recaptcha.php +41 -8 2.0.2 → 2.1.1 View file →
@@ -17,9 +17,9 @@
17 17 wp_die('Sorry, but you do not have permissions to change settings.');
18 18 }
19 19
20 20 if(!loginizer_is_premium() && count($_POST) > 0){
21 - $lz_error['not_in_free'] = __('This feature is not available in the Free version. <a href="'.LOGINIZER_PRICING_URL.'" target="_blank" style="text-decoration:none; color:green;"><b>Upgrade to Pro</b></a>', 'loginizer');
21 + $lz_error['not_in_free'] = __('This feature is not available in the Free version.', 'loginizer').' <a href="'.LOGINIZER_PRICING_URL.'" target="_blank" style="text-decoration:none; color:green;"><b>'.esc_html__('Upgrade to Pro', 'loginizer').'</b></a>';
22 22 return loginizer_page_recaptcha_T();
23 23 }
24 24
25 25 /* Make sure post was from this page */
@@ -82,8 +82,13 @@
82 82
83 83 // Sizes
84 84 $lz_env['size']['normal'] = 'Normal';
85 85 $lz_env['size']['compact'] = 'Compact';
86 +
87 + // Size cloudflare (turnstile)
88 + $lz_env['turnstile_size']['normal'] = 'Normal';
89 + $lz_env['turnstile_size']['compact'] = 'Compact';
90 + $lz_env['turnstile_size']['flexible'] = 'Flexible';
86 91
87 92 // reCAPTCHA Domains
88 93 $lz_env['captcha_domains']['www.google.com'] = 'google.com';
89 94 $lz_env['captcha_domains']['www.recaptcha.net'] = 'recaptcha.net';
@@ -148,8 +153,12 @@
148 153 $option['captcha_resetpass'] = (int) lz_optpost('captcha_resetpass');
149 154 $option['captcha_register'] = (int) lz_optpost('captcha_register');
150 155 $option['captcha_comment'] = (int) lz_optpost('captcha_comment');
151 156 $option['captcha_wc_checkout'] = (int) lz_optpost('captcha_wc_checkout');
157 + $option['captcha_wc_block_checkout'] = isset($_POST['captcha_wc_block_checkout']);
158 + $option['captcha_wc_checkout_pos'] = lz_optpost('captcha_wc_checkout_pos');
159 + $option['captcha_wpforms'] = (int) lz_optpost('captcha_wpforms');
160 + $option['captcha_contactform7'] = (int) lz_optpost('captcha_contactform7');
152 161
153 162 // Are we to use Math Captcha ?
154 163 if(!empty($_POST['captcha_status']) && $_POST['captcha_status'] == 2){
155 164
@@ -202,9 +211,9 @@
202 211 $lz_error['turn_captcha_theme'] = __('The Turnstile theme is invalid', 'loginizer');
203 212 }
204 213
205 214 // Is size valid ?
206 - if(empty($lz_env['size'][$option['turn_captcha_size']])){
215 + if(empty($lz_env['turnstile_size'][$option['turn_captcha_size']])){
207 216 $lz_error['turn_captcha_size'] = __('The Turnstile size is invalid', 'loginizer');
208 217 }
209 218
210 219 // Is lang valid ?
@@ -382,9 +391,9 @@
382 391
383 392 <tr class="lz_google_cap">
384 393 <td scope="row" valign="top"><label><b><?php echo __('reCAPTCHA type', 'loginizer'); ?></b></label><br>
385 394 <?php echo __('Choose the type of reCAPTCHA', 'loginizer'); ?><br />
386 - <?php echo __('<a href="https://g.co/recaptcha/sitetypes/" target="_blank">See Site Types for more details</a>', 'loginizer'); ?>
395 + <?php echo '<a href="https://developers.google.com/recaptcha/docs/versions" target="_blank">'.__('See Site Types for more details', 'loginizer').'</a>'; ?>
387 396 </td>
388 397 <td>
389 398 <input type="radio" value="v3" onchange="google_recaptcha_type()" <?php echo lz_POSTradio('captcha_type', 'v3', (!empty($loginizer['captcha_type']) ? $loginizer['captcha_type'] : '')); ?> name="captcha_type" id="captcha_type_v3" /> <label for="captcha_type_v3"><?php echo __('reCAPTCHA v3', 'loginizer'); ?></label><br /><br />
390 399 <input type="radio" value="" onchange="google_recaptcha_type()" <?php echo lz_POSTradio('captcha_type', '', (!empty($loginizer['captcha_type']) ? $loginizer['captcha_type'] : '')); ?> name="captcha_type" id="captcha_type_v2" /> <label for="captcha_type_v2"><?php echo __('reCAPTCHA v2 - Checkbox', 'loginizer'); ?></label><br /><br />
@@ -396,9 +405,9 @@
396 405 <?php echo __('Make sure you enter the correct keys as per the reCAPTCHA type selected above', 'loginizer'); ?>
397 406 </td>
398 407 <td>
399 408 <input type="text" size="50" value="<?php echo lz_optpost('captcha_key', (!empty($loginizer['captcha_key']) ? $loginizer['captcha_key'] : '')); ?>" name="captcha_key" id="captcha_key" /><br />
400 - <?php echo __('Get the Site Key and Secret Key from <a href="https://www.google.com/recaptcha/admin/" target="_blank">Google</a>', 'loginizer'); ?>
409 + <?php echo __('Get the Site Key and Secret Key from', 'loginizer'). ' <a href="https://www.google.com/recaptcha/admin/" target="_blank">Google</a>'; ?>
401 410 </td>
402 411 </tr>
403 412 <tr class="lz_google_cap">
404 413 <td scope="row" valign="top"><label for="captcha_secret"><b><?php echo __('Secret Key', 'loginizer'); ?></b></label></td>
@@ -473,9 +482,9 @@
473 482 <td scope="row" valign="top"><label for="turn_captcha_key"><b><?php echo __('Site Key', 'loginizer'); ?></b></label><br>
474 483 </td>
475 484 <td>
476 485 <input type="text" size="50" value="<?php echo lz_optpost('turn_captcha_key', (!empty($loginizer['turn_captcha_key']) ? $loginizer['turn_captcha_key'] : '')); ?>" name="turn_captcha_key" id="turn_captcha_key" /><br />
477 - <?php echo __('Get the Site Key and Secret Key from <a href="https://dash.cloudflare.com/sign-up?to=/:account/turnstile" target="_blank">Cloudflare Turnstile</a>', 'loginizer'); ?>
486 + <?php echo __('Get the Site Key and Secret Key from', 'loginizer').' <a href="https://dash.cloudflare.com/sign-up?to=/:account/turnstile" target="_blank">Cloudflare Turnstile</a>'; ?>
478 487 </td>
479 488 </tr>
480 489 <tr class="lz_turnstile_cap">
481 490 <td scope="row" valign="top"><label for="turn_captcha_secret"><b><?php echo __('Secret Key', 'loginizer'); ?></b></label></td>
@@ -507,14 +516,14 @@
507 516 ?>
508 517 </select>
509 518 </td>
510 519 </tr>
511 - <tr class="lz_turnstile_cap lz_google_cap_size">
520 + <tr class="lz_turnstile_cap">
512 521 <td scope="row" valign="top"><label for="turn_captcha_size"><b><?php echo __('Size', 'loginizer'); ?></b></label></td>
513 522 <td>
514 523 <select name="turn_captcha_size" id="turn_captcha_size">
515 524 <?php
516 - foreach($lz_env['size'] as $k => $v){
525 + foreach($lz_env['turnstile_size'] as $k => $v){
517 526 echo '<option '.lz_POSTselect('turn_captcha_size', $k, ((!empty($loginizer['turn_captcha_size']) && $loginizer['turn_captcha_size'] == $k) ? true : false)).' value="'.$k.'">'.$v.'</option>';
518 527 }
519 528 ?>
520 529 </select>
@@ -606,10 +615,34 @@
606 615
607 616 echo '<tr>
608 617 <td><label for="captcha_wc_checkout">'.__('WooCommerce Checkout', 'loginizer').'</label></td>
609 618 <td><input type="checkbox" value="1" name="captcha_wc_checkout" id="captcha_wc_checkout" '.lz_POSTchecked('captcha_wc_checkout', (empty($loginizer['captcha_wc_checkout']) ? false : true)).' /></td>
619 + </tr>
620 + <tr>
621 + <td><label for="captcha_wc_block_checkout">'.__('WooCommerce Block based Checkout', 'loginizer').'</label></td>
622 + <td><input type="checkbox" value="1" name="captcha_wc_block_checkout" id="captcha_wc_block_checkout" '.lz_POSTchecked('captcha_wc_block_checkout', (!empty($loginizer['captcha_wc_block_checkout']))).' /></td>
623 + </tr>
624 +
625 + <tr>
626 + <td><label for="captcha_wc_checkout_pos">'.__('WooCommerce Checkout Position', 'loginizer').'</label></td>
627 + <td>
628 + <select value="'.lz_optpost('captcha_wc_checkout_pos').'" name="captcha_wc_checkout_pos" id="captcha_wc_checkout_pos" />
629 + <option value="" '.(isset($loginizer['captcha_wc_checkout_pos']) ? selected($loginizer['captcha_wc_checkout_pos'], '', false) : '').'>'.__('Before Payment', 'loginizer').'</option>
630 + <option value="before_submit" '.(isset($loginizer['captcha_wc_checkout_pos']) ? selected($loginizer['captcha_wc_checkout_pos'], 'before_submit', false) : '').'>'.__('Before Order Button', 'loginizer').'</option>
631 + </select>
632 + </td>
633 + </tr>
634 + <tr>
635 + <td><label for="captcha_wpforms">'.__('WPForms', 'loginizer').'</label></td>
636 + <td><input type="checkbox" value="1" name="captcha_wpforms" id="captcha_wpforms" '.lz_POSTchecked('captcha_wpforms', (empty($loginizer['captcha_wpforms']) ? false : true)).' /></td>
637 + </tr>
638 + <tr>
639 + <td><label for="captcha_contactform7">'.__('ContactForm7', 'loginizer').'</label></td>
640 + <td><input type="checkbox" value="1" name="captcha_contactform7" id="captcha_contactform7" '.lz_POSTchecked('captcha_contactform7', (empty($loginizer['captcha_contactform7']) ? false : true)).' /></td>
641 + </tr>
642 + <tr>
643 + <td>'.__('To use the Loginizer reCAPTCHA on Contact Form 7 please enable the above checkbox add the shortcode: [loginizer_pro_recaptcha]', 'loginizer').'</td>
610 644 </tr>';
611 -
612 645 }
613 646
614 647 ?>
615 648 </table>