Changeset 3233219
- Timestamp:
- 02/01/2025 08:15:02 PM (14 months ago)
- Location:
- hostbox-google-recaptcha
- Files:
-
- 4 edited
- 1 copied
-
tags/0.0.7 (copied) (copied from hostbox-google-recaptcha/trunk)
-
tags/0.0.7/hostbox-recaptcha.php (modified) (9 diffs)
-
tags/0.0.7/readme.txt (modified) (3 diffs)
-
trunk/hostbox-recaptcha.php (modified) (9 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hostbox-google-recaptcha/tags/0.0.7/hostbox-recaptcha.php
r3232942 r3233219 3 3 Plugin Name: Hostbox Google reCAPTCHA 4 4 Description: Adds Google reCAPTCHA (v2 or v3) to WordPress, compatible with WooCommerce and Contact Form 7. 5 Version: 0.0. 65 Version: 0.0.7 6 6 Author: Hostbox 7 7 Author URI: https://www.hostbox.me … … 117 117 $this->plugin_url . 'css/recaptcha.css', 118 118 [], 119 '0.0. 6'119 '0.0.7' 120 120 ); 121 121 … … 129 129 $recaptcha_url, 130 130 [], 131 '0.0. 6',131 '0.0.7', 132 132 ['strategy' => 'defer'], 133 133 ); … … 138 138 $this->plugin_url . 'js/recaptcha.js', 139 139 ['jquery', 'google-recaptcha'], 140 '0.0. 6',140 '0.0.7', 141 141 true 142 142 ); … … 147 147 $this->plugin_url . 'js/admin.js', 148 148 ['jquery'], 149 '0.0. 6',149 '0.0.7', 150 150 true 151 151 ); … … 233 233 */ 234 234 public function verify_wc_recaptcha($error) { 235 if (empty($this->site_key)) { 236 return $error; 237 } 238 235 239 if (!$this->verify_recaptcha()) { 236 240 return new WP_Error('captcha_error', $this->verify_recaptcha_error()); … … 244 248 */ 245 249 public function verify_comment_captcha($commentdata) { 250 if (empty($this->site_key)) { 251 return $commentdata; 252 } 253 246 254 if (!$this->verify_recaptcha()) { 247 255 wp_die(esc_html($this->verify_recaptcha_error()), 'Captcha Verification Failed', ['response' => 403, 'back_link' => true]); … … 303 311 */ 304 312 public function verify_login_captcha($user, $username, $password) { 313 if (empty($this->site_key)) { 314 return $user; 315 } 316 305 317 if (isset($_POST['woocommerce-login-nonce'])) { 306 318 if (!wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['woocommerce-login-nonce'], 'woocommerce-login')))) { … … 322 334 */ 323 335 private function verify_recaptcha() { 324 // If no secret key is set, bypass verification325 336 if (empty($this->secret_key)) { 326 337 return false; -
hostbox-google-recaptcha/tags/0.0.7/readme.txt
r3232942 r3233219 6 6 Tested up to: 6.7.1 7 7 Requires PHP: 7.0 8 Stable tag: 0.0. 68 Stable tag: 0.0.7 9 9 Author: Hostbox 10 10 Author URI: https://www.hostbox.me … … 99 99 = February 1, 2023 = 100 100 101 Version 0.0.7 changelog: 102 103 * Fixed: Skip verification if no site key is set 104 101 105 Version 0.0.6 changelog: 102 106 … … 132 136 == Upgrade Notice == 133 137 138 = 0.0.7 = 139 140 * Fixed: Skip verification if no site key is set 141 134 142 = 0.0.6 = 135 143 -
hostbox-google-recaptcha/trunk/hostbox-recaptcha.php
r3232942 r3233219 3 3 Plugin Name: Hostbox Google reCAPTCHA 4 4 Description: Adds Google reCAPTCHA (v2 or v3) to WordPress, compatible with WooCommerce and Contact Form 7. 5 Version: 0.0. 65 Version: 0.0.7 6 6 Author: Hostbox 7 7 Author URI: https://www.hostbox.me … … 117 117 $this->plugin_url . 'css/recaptcha.css', 118 118 [], 119 '0.0. 6'119 '0.0.7' 120 120 ); 121 121 … … 129 129 $recaptcha_url, 130 130 [], 131 '0.0. 6',131 '0.0.7', 132 132 ['strategy' => 'defer'], 133 133 ); … … 138 138 $this->plugin_url . 'js/recaptcha.js', 139 139 ['jquery', 'google-recaptcha'], 140 '0.0. 6',140 '0.0.7', 141 141 true 142 142 ); … … 147 147 $this->plugin_url . 'js/admin.js', 148 148 ['jquery'], 149 '0.0. 6',149 '0.0.7', 150 150 true 151 151 ); … … 233 233 */ 234 234 public function verify_wc_recaptcha($error) { 235 if (empty($this->site_key)) { 236 return $error; 237 } 238 235 239 if (!$this->verify_recaptcha()) { 236 240 return new WP_Error('captcha_error', $this->verify_recaptcha_error()); … … 244 248 */ 245 249 public function verify_comment_captcha($commentdata) { 250 if (empty($this->site_key)) { 251 return $commentdata; 252 } 253 246 254 if (!$this->verify_recaptcha()) { 247 255 wp_die(esc_html($this->verify_recaptcha_error()), 'Captcha Verification Failed', ['response' => 403, 'back_link' => true]); … … 303 311 */ 304 312 public function verify_login_captcha($user, $username, $password) { 313 if (empty($this->site_key)) { 314 return $user; 315 } 316 305 317 if (isset($_POST['woocommerce-login-nonce'])) { 306 318 if (!wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['woocommerce-login-nonce'], 'woocommerce-login')))) { … … 322 334 */ 323 335 private function verify_recaptcha() { 324 // If no secret key is set, bypass verification325 336 if (empty($this->secret_key)) { 326 337 return false; -
hostbox-google-recaptcha/trunk/readme.txt
r3232942 r3233219 6 6 Tested up to: 6.7.1 7 7 Requires PHP: 7.0 8 Stable tag: 0.0. 68 Stable tag: 0.0.7 9 9 Author: Hostbox 10 10 Author URI: https://www.hostbox.me … … 99 99 = February 1, 2023 = 100 100 101 Version 0.0.7 changelog: 102 103 * Fixed: Skip verification if no site key is set 104 101 105 Version 0.0.6 changelog: 102 106 … … 132 136 == Upgrade Notice == 133 137 138 = 0.0.7 = 139 140 * Fixed: Skip verification if no site key is set 141 134 142 = 0.0.6 = 135 143
Note: See TracChangeset
for help on using the changeset viewer.