Changeset 3068714
- Timestamp:
- 04/11/2024 01:23:41 AM (2 years ago)
- Location:
- recaptcha-for-mw-wp-form
- Files:
-
- 8 edited
- 1 copied
-
tags/1.1.3 (copied) (copied from recaptcha-for-mw-wp-form/trunk)
-
tags/1.1.3/controllers/EnqueueController.php (modified) (1 diff)
-
tags/1.1.3/readme.txt (modified) (1 diff)
-
tags/1.1.3/recaptcha-for-mw-wp-form.php (modified) (1 diff)
-
tags/1.1.3/views/admin.php (modified) (3 diffs)
-
trunk/controllers/EnqueueController.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/recaptcha-for-mw-wp-form.php (modified) (1 diff)
-
trunk/views/admin.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
recaptcha-for-mw-wp-form/tags/1.1.3/controllers/EnqueueController.php
r2709496 r3068714 24 24 $data = <<< EOL 25 25 grecaptcha.ready(function() { 26 grecaptcha.execute('$site_key', { 26 jQuery('form').on('submit', function(e) { 27 e.preventDefault(); 28 grecaptcha.execute('$site_key', { 27 29 action: 'homepage' 28 30 }).then(function(token) { 29 31 var recaptchaResponse = jQuery('input[name="recaptcha-v3"]'); 30 32 recaptchaResponse.val(token); 33 let form = e.target; 34 if (form.querySelector("[name=submitConfirm]")) { 35 const confirmButtonValue = form.querySelector("[name=submitConfirm]").value; 36 const confirmButton = document.createElement("input"); 37 confirmButton.type = "hidden"; 38 confirmButton.value = confirmButtonValue; 39 confirmButton.name = "submitConfirm"; 40 form.appendChild(confirmButton); 41 } 42 form.submit(); 31 43 }); 32 44 }); 45 }); 33 46 EOL; 34 47 wp_add_inline_script('recaptcha-script', $data); -
recaptcha-for-mw-wp-form/tags/1.1.3/readme.txt
r2982383 r3068714 4 4 Tags: : form, mail, MW WP Form, reCAPTCHA 5 5 Requires at least: 4.0 or higher 6 Tested up to: 6. 3.27 Stable tag: 1.1. 26 Tested up to: 6.5.2 7 Stable tag: 1.1.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
recaptcha-for-mw-wp-form/tags/1.1.3/recaptcha-for-mw-wp-form.php
r2982383 r3068714 4 4 Description: You can use reCAPTCHA v3 on the MW WP Form. 5 5 Author: Nakashima Masahiro 6 Version: 1.1. 26 Version: 1.1.3 7 7 Plugin URI: https://github.com/kanakogi/recaptcha-for-mw-wp-form 8 8 License: GPLv2 or later -
recaptcha-for-mw-wp-form/tags/1.1.3/views/admin.php
r2982383 r3068714 38 38 <th>Site Key</th> 39 39 <td> 40 <input type="text" name="site_key" class="regular-text" value="<?= $option['site_key'] ? >">40 <input type="text" name="site_key" class="regular-text" value="<?= $option['site_key'] ?? '' ?>"> 41 41 </td> 42 42 </tr> … … 45 45 <td> 46 46 <input type="text" name="secret_key" class="regular-text" value=""> 47 <?php if ( $option['secret_key'] != '') : ?>47 <?php if (isset($option['secret_key']) && $option['secret_key'] != '') : ?> 48 48 <p class="description"><?php _e('Secret Key has been saved.', Config::TEXTDOMAIN) ?></p> 49 49 <?php endif; ?> … … 53 53 <th>Threshold score (0.00 - 1.00)</th> 54 54 <td> 55 <input type="number" name="threshold_score" min="0" max="1" step="0.01" class="regular-text" value="<?= $option['threshold_score'] ?>">55 <input type="number" name="threshold_score" min="0" max="1" step="0.01" class="regular-text" value="<?= $option['threshold_score'] ?? '' ?>"> 56 56 </td> 57 57 </tr> -
recaptcha-for-mw-wp-form/trunk/controllers/EnqueueController.php
r2709496 r3068714 24 24 $data = <<< EOL 25 25 grecaptcha.ready(function() { 26 grecaptcha.execute('$site_key', { 26 jQuery('form').on('submit', function(e) { 27 e.preventDefault(); 28 grecaptcha.execute('$site_key', { 27 29 action: 'homepage' 28 30 }).then(function(token) { 29 31 var recaptchaResponse = jQuery('input[name="recaptcha-v3"]'); 30 32 recaptchaResponse.val(token); 33 let form = e.target; 34 if (form.querySelector("[name=submitConfirm]")) { 35 const confirmButtonValue = form.querySelector("[name=submitConfirm]").value; 36 const confirmButton = document.createElement("input"); 37 confirmButton.type = "hidden"; 38 confirmButton.value = confirmButtonValue; 39 confirmButton.name = "submitConfirm"; 40 form.appendChild(confirmButton); 41 } 42 form.submit(); 31 43 }); 32 44 }); 45 }); 33 46 EOL; 34 47 wp_add_inline_script('recaptcha-script', $data); -
recaptcha-for-mw-wp-form/trunk/readme.txt
r2982383 r3068714 4 4 Tags: : form, mail, MW WP Form, reCAPTCHA 5 5 Requires at least: 4.0 or higher 6 Tested up to: 6. 3.27 Stable tag: 1.1. 26 Tested up to: 6.5.2 7 Stable tag: 1.1.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
recaptcha-for-mw-wp-form/trunk/recaptcha-for-mw-wp-form.php
r2982383 r3068714 4 4 Description: You can use reCAPTCHA v3 on the MW WP Form. 5 5 Author: Nakashima Masahiro 6 Version: 1.1. 26 Version: 1.1.3 7 7 Plugin URI: https://github.com/kanakogi/recaptcha-for-mw-wp-form 8 8 License: GPLv2 or later -
recaptcha-for-mw-wp-form/trunk/views/admin.php
r2982383 r3068714 38 38 <th>Site Key</th> 39 39 <td> 40 <input type="text" name="site_key" class="regular-text" value="<?= $option['site_key'] ? >">40 <input type="text" name="site_key" class="regular-text" value="<?= $option['site_key'] ?? '' ?>"> 41 41 </td> 42 42 </tr> … … 45 45 <td> 46 46 <input type="text" name="secret_key" class="regular-text" value=""> 47 <?php if ( $option['secret_key'] != '') : ?>47 <?php if (isset($option['secret_key']) && $option['secret_key'] != '') : ?> 48 48 <p class="description"><?php _e('Secret Key has been saved.', Config::TEXTDOMAIN) ?></p> 49 49 <?php endif; ?> … … 53 53 <th>Threshold score (0.00 - 1.00)</th> 54 54 <td> 55 <input type="number" name="threshold_score" min="0" max="1" step="0.01" class="regular-text" value="<?= $option['threshold_score'] ?>">55 <input type="number" name="threshold_score" min="0" max="1" step="0.01" class="regular-text" value="<?= $option['threshold_score'] ?? '' ?>"> 56 56 </td> 57 57 </tr>
Note: See TracChangeset
for help on using the changeset viewer.