Changeset 3199524
- Timestamp:
- 11/29/2024 03:13:54 PM (15 months ago)
- Location:
- adcaptcha
- Files:
-
- 8 edited
- 1 copied
-
tags/1.5.4 (copied) (copied from adcaptcha/trunk)
-
tags/1.5.4/adcaptcha.php (modified) (2 diffs)
-
tags/1.5.4/readme.txt (modified) (2 diffs)
-
tags/1.5.4/src/Plugin/Comments.php (modified) (1 diff)
-
tags/1.5.4/src/Settings/Settings.php (modified) (2 diffs)
-
trunk/adcaptcha.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/Plugin/Comments.php (modified) (1 diff)
-
trunk/src/Settings/Settings.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
adcaptcha/tags/1.5.4/adcaptcha.php
r3198915 r3199524 3 3 * Plugin Name: adCAPTCHA for WordPress 4 4 * Description: Secure your site. Elevate your brand. Boost Ad Revenue. 5 * Version: 1.5. 35 * Version: 1.5.4 6 6 * Requires at least: 6.4.2 7 7 * Requires PHP: 7.4 … … 44 44 use AdCaptcha\Instantiate; 45 45 46 const PLUGIN_VERSION_ADCAPTCHA = '1.5. 3';46 const PLUGIN_VERSION_ADCAPTCHA = '1.5.4'; 47 47 define('ADCAPTCHA_ERROR_MESSAGE', __( 'Please complete the I am human box.', 'adcaptcha' )); 48 48 -
adcaptcha/tags/1.5.4/readme.txt
r3198915 r3199524 5 5 Requires at least: 6.0 6 6 Tested up to: 6.5.2 7 Stable tag: 1.5. 37 Stable tag: 1.5.4 8 8 Requires PHP: 7.4 9 9 License: GPLv2 or later … … 141 141 = 1.5.3 = 142 142 - Added advanced settings which includes a Woocommerce checkout feature, to trigger adCAPTCHA from the place order button. 143 144 = 1.5.4 = 145 - Minor bug fix for wordpress comments form -
adcaptcha/tags/1.5.4/src/Plugin/Comments.php
r3080455 r3199524 9 9 10 10 class Comments extends AdCaptchaPlugin { 11 private $verified = false; 11 12 12 13 public function setup() { 14 global $adCAPTCHAWordpressComments; 15 $adCAPTCHAWordpressComments = $this; 13 16 add_action( 'comment_form', [ AdCaptcha::class, 'enqueue_scripts' ] ); 14 17 add_action( 'comment_form', [ Verify::class, 'get_success_token' ] ); 15 18 add_filter( 'comment_form_submit_field', [ $this, 'captcha_trigger_filter' ] ); 16 add_ action( 'pre_comment_approved', [ $this, 'verify' ], 20, 2 );19 add_filter( 'pre_comment_approved', [ $adCAPTCHAWordpressComments, 'verify' ], 20, 2 ); 17 20 } 18 21 19 22 public function verify( $approved, array $commentdata ) { 23 if ( $this->verified ) { 24 return $approved; 25 } 26 20 27 $successToken = sanitize_text_field(wp_unslash($_POST['adcaptcha_successToken'])); 21 28 $verify = new Verify(); 22 29 $response = $verify->verify_token($successToken); 23 30 24 25 31 if ( $response === false ) { 26 32 $approved = new WP_Error( 'adcaptcha_error', __( 'Incomplete captcha, Please try again', 'adcaptcha' ), 400 ); 33 return $approved; 27 34 } 28 35 36 $this->verified = true; 29 37 return $approved; 30 38 } -
adcaptcha/tags/1.5.4/src/Settings/Settings.php
r3198915 r3199524 64 64 $pluginsSettings = new \AdCaptcha\Settings\Plugins\Plugins(); 65 65 $pluginsSettings->render_plugins_settings(); 66 break; 66 67 case 'advance': 67 68 $advanceSettings = new \AdCaptcha\Settings\Advance\Advance(); … … 80 81 81 82 public function change_admin_footer_version() { 82 return 'Version 1.5. 3';83 return 'Version 1.5.4'; 83 84 } 84 85 } -
adcaptcha/trunk/adcaptcha.php
r3198915 r3199524 3 3 * Plugin Name: adCAPTCHA for WordPress 4 4 * Description: Secure your site. Elevate your brand. Boost Ad Revenue. 5 * Version: 1.5. 35 * Version: 1.5.4 6 6 * Requires at least: 6.4.2 7 7 * Requires PHP: 7.4 … … 44 44 use AdCaptcha\Instantiate; 45 45 46 const PLUGIN_VERSION_ADCAPTCHA = '1.5. 3';46 const PLUGIN_VERSION_ADCAPTCHA = '1.5.4'; 47 47 define('ADCAPTCHA_ERROR_MESSAGE', __( 'Please complete the I am human box.', 'adcaptcha' )); 48 48 -
adcaptcha/trunk/readme.txt
r3198915 r3199524 5 5 Requires at least: 6.0 6 6 Tested up to: 6.5.2 7 Stable tag: 1.5. 37 Stable tag: 1.5.4 8 8 Requires PHP: 7.4 9 9 License: GPLv2 or later … … 141 141 = 1.5.3 = 142 142 - Added advanced settings which includes a Woocommerce checkout feature, to trigger adCAPTCHA from the place order button. 143 144 = 1.5.4 = 145 - Minor bug fix for wordpress comments form -
adcaptcha/trunk/src/Plugin/Comments.php
r3080455 r3199524 9 9 10 10 class Comments extends AdCaptchaPlugin { 11 private $verified = false; 11 12 12 13 public function setup() { 14 global $adCAPTCHAWordpressComments; 15 $adCAPTCHAWordpressComments = $this; 13 16 add_action( 'comment_form', [ AdCaptcha::class, 'enqueue_scripts' ] ); 14 17 add_action( 'comment_form', [ Verify::class, 'get_success_token' ] ); 15 18 add_filter( 'comment_form_submit_field', [ $this, 'captcha_trigger_filter' ] ); 16 add_ action( 'pre_comment_approved', [ $this, 'verify' ], 20, 2 );19 add_filter( 'pre_comment_approved', [ $adCAPTCHAWordpressComments, 'verify' ], 20, 2 ); 17 20 } 18 21 19 22 public function verify( $approved, array $commentdata ) { 23 if ( $this->verified ) { 24 return $approved; 25 } 26 20 27 $successToken = sanitize_text_field(wp_unslash($_POST['adcaptcha_successToken'])); 21 28 $verify = new Verify(); 22 29 $response = $verify->verify_token($successToken); 23 30 24 25 31 if ( $response === false ) { 26 32 $approved = new WP_Error( 'adcaptcha_error', __( 'Incomplete captcha, Please try again', 'adcaptcha' ), 400 ); 33 return $approved; 27 34 } 28 35 36 $this->verified = true; 29 37 return $approved; 30 38 } -
adcaptcha/trunk/src/Settings/Settings.php
r3198915 r3199524 64 64 $pluginsSettings = new \AdCaptcha\Settings\Plugins\Plugins(); 65 65 $pluginsSettings->render_plugins_settings(); 66 break; 66 67 case 'advance': 67 68 $advanceSettings = new \AdCaptcha\Settings\Advance\Advance(); … … 80 81 81 82 public function change_admin_footer_version() { 82 return 'Version 1.5. 3';83 return 'Version 1.5.4'; 83 84 } 84 85 }
Note: See TracChangeset
for help on using the changeset viewer.