WPBruiser {no- Captcha anti-Spam} - Version 3.1.14

Version Description

Improvements - Integrated with HTML Forms Plugin

Download this release

Release Info

Developer mihche
Plugin Icon 128x128 WPBruiser {no- Captcha anti-Spam}
Version 3.1.14
Comparing to
See all releases

Code changes from version 3.1.12 to 3.1.14

engine/GdbcAjaxController.php CHANGED
@@ -58,6 +58,7 @@ final class GdbcAjaxController
58
  GdbcModulesController::MODULE_AFFILIATE_WP,
59
  GdbcModulesController::MODULE_EASY_DIGITAL_DOWNLOADS,
60
  GdbcModulesController::MODULE_QUFORM,
 
61
  ) as $moduleName){
62
 
63
  if(null === ($publicModuleInstance = GdbcModulesController::getPublicModuleInstance($moduleName)))
58
  GdbcModulesController::MODULE_AFFILIATE_WP,
59
  GdbcModulesController::MODULE_EASY_DIGITAL_DOWNLOADS,
60
  GdbcModulesController::MODULE_QUFORM,
61
+ GdbcModulesController::MODULE_HTML_FORMS,
62
  ) as $moduleName){
63
 
64
  if(null === ($publicModuleInstance = GdbcModulesController::getPublicModuleInstance($moduleName)))
engine/GdbcModulesController.php CHANGED
@@ -38,6 +38,7 @@ final class GdbcModulesController
38
  CONST MODULE_NINJA_FORMS = 'NinjaForms';
39
  CONST MODULE_CONTACT_FORM_7 = 'ContactForm7';
40
  CONST MODULE_GRAVITY_FORMS = 'GravityForms';
 
41
  CONST MODULE_FAST_SECURE_FORM = 'FastSecureForm';
42
  CONST MODULE_FORMIDABLE_FORMS = 'FormidableForms';
43
  CONST MODULE_JETPACK_CONTACT_FORM = 'JetPackContactForm';
@@ -137,8 +138,8 @@ final class GdbcModulesController
137
  'IsLicensed' => true,
138
  ),
139
  'classes' => array(
140
- 'GdbcGravityFormsAdminModule' => '/modules/gravity-forms/GdbcGravityFormsAdminModule.php',
141
- 'GdbcGravityFormsPublicModule' => '/modules/gravity-forms/GdbcGravityFormsPublicModule.php',
142
  )
143
  ),
144
 
@@ -461,7 +462,18 @@ final class GdbcModulesController
461
  'GdbcUltraCommunityPublicModule' => '/modules/ultra-community/GdbcUltraCommunityPublicModule.php',
462
  )
463
  ),
464
-
 
 
 
 
 
 
 
 
 
 
 
465
  );
466
 
467
 
38
  CONST MODULE_NINJA_FORMS = 'NinjaForms';
39
  CONST MODULE_CONTACT_FORM_7 = 'ContactForm7';
40
  CONST MODULE_GRAVITY_FORMS = 'GravityForms';
41
+ CONST MODULE_HTML_FORMS = 'HTML Forms';
42
  CONST MODULE_FAST_SECURE_FORM = 'FastSecureForm';
43
  CONST MODULE_FORMIDABLE_FORMS = 'FormidableForms';
44
  CONST MODULE_JETPACK_CONTACT_FORM = 'JetPackContactForm';
138
  'IsLicensed' => true,
139
  ),
140
  'classes' => array(
141
+ 'GdbcGravityFormsAdminModule' => '/modules/gravity-forms/GdbcGravityFormsAdminModule.php',
142
+ 'GdbcHtmlFormsPublicModule' => '/modules/gravity-forms/GdbcGravityFormsPublicModule.php',
143
  )
144
  ),
145
 
462
  'GdbcUltraCommunityPublicModule' => '/modules/ultra-community/GdbcUltraCommunityPublicModule.php',
463
  )
464
  ),
465
+
466
+ self::MODULE_HTML_FORMS => array(
467
+ 'info' => array(
468
+ 'ModuleId' => 36,
469
+ 'IsLicensed' => false,
470
+ ),
471
+ 'classes' => array(
472
+ 'GdbcHtmlFormsAdminModule' => '/modules/html-forms/GdbcHtmlFormsAdminModule.php',
473
+ 'GdbcHtmlFormsPublicModule' => '/modules/html-forms/GdbcHtmlFormsPublicModule.php',
474
+ )
475
+ ),
476
+
477
  );
478
 
479
 
engine/admin/pages/GdbcContactFormsAdminPage.php CHANGED
@@ -24,7 +24,10 @@ class GdbcContactFormsAdminPage extends GdbcBaseAdminPage
24
  parent::__construct($pageMenuTitle, $pageBrowserTitle, $pluginSlug);
25
 
26
  $modulesList = array();
27
-
 
 
 
28
  if(GdbcModulesController::isModuleRegistered(GdbcModulesController::MODULE_JETPACK_CONTACT_FORM))
29
  $modulesList[] = GdbcJetPackContactFormAdminModule::getInstance();
30
 
24
  parent::__construct($pageMenuTitle, $pageBrowserTitle, $pluginSlug);
25
 
26
  $modulesList = array();
27
+
28
+ if(GdbcModulesController::isModuleRegistered(GdbcModulesController::MODULE_HTML_FORMS))
29
+ $modulesList[] = GdbcHtmlFormsAdminModule::getInstance();
30
+
31
  if(GdbcModulesController::isModuleRegistered(GdbcModulesController::MODULE_JETPACK_CONTACT_FORM))
32
  $modulesList[] = GdbcJetPackContactFormAdminModule::getInstance();
33
 
engine/modules/html-forms/GdbcHtmlFormsAdminModule.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ final class GdbcHtmlFormsAdminModule extends GdbcBaseAdminModule
4
+ {
5
+ CONST OPTION_IS_HTML_FORMS_ACTIVATED = 'IsHTMLFormsActivated';
6
+
7
+ protected function __construct()
8
+ {
9
+ parent::__construct();
10
+ }
11
+
12
+ public function getDefaultOptions()
13
+ {
14
+ static $arrDefaultSettingOptions = null;
15
+ if(null !== $arrDefaultSettingOptions)
16
+ return $arrDefaultSettingOptions;
17
+
18
+ $arrDefaultSettingOptions = array(
19
+
20
+ self::OPTION_IS_HTML_FORMS_ACTIVATED => array(
21
+ 'Id' => 1,
22
+ 'Value' => NULL,
23
+ 'LabelText' => __('HTML Forms', GoodByeCaptcha::PLUGIN_SLUG),
24
+ 'InputType' => MchGdbcHtmlUtils::FORM_ELEMENT_INPUT_CHECKBOX,
25
+ 'Description' => __('Protects all your forms built with <a target="_blank" href="https://wordpress.org/plugins/html-forms/">HTML Forms Plugin</a>', GoodByeCaptcha::PLUGIN_SLUG),
26
+ ),
27
+
28
+ );
29
+
30
+ return $arrDefaultSettingOptions;
31
+
32
+ }
33
+
34
+ public function validateModuleSettingsFields($arrSettingOptions)
35
+ {
36
+ return $arrSettingOptions;
37
+ }
38
+
39
+ public function renderModuleSettingsSectionHeader(array $arrSectionInfo)
40
+ {
41
+ echo '<h3>' . __('Popular Contact Forms Settings', GoodByeCaptcha::PLUGIN_SLUG) . '</h3><hr />';
42
+ echo '<h4>' . __('Enable protection for the following popular contact forms:', GoodByeCaptcha::PLUGIN_SLUG) . '</h4>';
43
+ }
44
+
45
+ public function getFormattedBlockedContent(GdbcAttemptEntity $attemptEntity)
46
+ {
47
+ }
48
+
49
+
50
+ public static function getInstance()
51
+ {
52
+ static $adminInstance = null;
53
+ return null !== $adminInstance ? $adminInstance : $adminInstance = new self();
54
+ }
55
+ }
engine/modules/html-forms/GdbcHtmlFormsPublicModule.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ final class GdbcHtmlFormsPublicModule extends GdbcBasePublicModule
4
+ {
5
+ protected function __construct()
6
+ {
7
+ parent::__construct();
8
+
9
+ if(!$this->getOption(GdbcHtmlFormsAdminModule::OPTION_IS_HTML_FORMS_ACTIVATED))
10
+ return;
11
+
12
+ $this->activateHtmlFormsHooks();
13
+
14
+ }
15
+
16
+ public function activateHtmlFormsHooks()
17
+ {
18
+ add_filter('hf_form_html', array($this, 'injectTokenField'), 1, 1);
19
+
20
+ add_filter('hf_form_message_blocked_by_gdbc', array($this, 'getErrorMessage'), 10, 1 );
21
+
22
+ add_filter('hf_validate_form_request_size', '__return_false');
23
+
24
+ add_filter('hf_validate_form', array($this, 'validateFormsRequest'), PHP_INT_MAX, 1 );
25
+ }
26
+
27
+ public function getErrorMessage($errorMessage)
28
+ {
29
+ return $errorMessage = __('Your submission seems to be a spam!', GoodByeCaptcha::PLUGIN_SLUG);
30
+ }
31
+
32
+ public function injectTokenField($formOutputContent)
33
+ {
34
+ return str_replace('</form>', $this->getTokenFieldHtml() . '</form>', $formOutputContent);
35
+ }
36
+
37
+
38
+ public function validateFormsRequest($errorCode)
39
+ {
40
+ $this->attemptEntity->SectionId = $this->getOptionIdByOptionName(GdbcHtmlFormsAdminModule::OPTION_IS_HTML_FORMS_ACTIVATED);
41
+
42
+ return GdbcRequestController::isValid($this->attemptEntity) ? null : 'blocked_by_gdbc';
43
+ }
44
+
45
+ /**
46
+ * @return int
47
+ */
48
+ protected function getModuleId()
49
+ {
50
+ return GdbcModulesController::getModuleIdByName(GdbcModulesController::MODULE_HTML_FORMS);
51
+ }
52
+
53
+
54
+ public static function getInstance()
55
+ {
56
+ static $adminInstance = null;
57
+ return null !== $adminInstance ? $adminInstance : $adminInstance = new self();
58
+ }
59
+
60
+
61
+ }
engine/modules/jetpack-contact-form/GdbcJetPackContactFormAdminModule.php CHANGED
@@ -56,8 +56,8 @@ final class GdbcJetPackContactFormAdminModule extends GdbcBaseAdminModule
56
 
57
  public function renderModuleSettingsSectionHeader(array $arrSectionInfo)
58
  {
59
- echo '<h3>' . __('Popular Contact Forms Settings', GoodByeCaptcha::PLUGIN_SLUG) . '</h3><hr />';
60
- echo '<h4>' . __('Enable protection for the following popular contact forms:', GoodByeCaptcha::PLUGIN_SLUG) . '</h4>';
61
  }
62
 
63
  public function getFormattedBlockedContent(GdbcAttemptEntity $attemptEntity)
56
 
57
  public function renderModuleSettingsSectionHeader(array $arrSectionInfo)
58
  {
59
+ // echo '<h3>' . __('Popular Contact Forms Settings', GoodByeCaptcha::PLUGIN_SLUG) . '</h3><hr />';
60
+ // echo '<h4>' . __('Enable protection for the following popular contact forms:', GoodByeCaptcha::PLUGIN_SLUG) . '</h4>';
61
  }
62
 
63
  public function getFormattedBlockedContent(GdbcAttemptEntity $attemptEntity)
engine/modules/ultra-community/GdbcUltraCommunityPublicModule.php CHANGED
@@ -29,9 +29,9 @@ final class GdbcUltraCommunityPublicModule extends GdbcBasePublicModule
29
  return;
30
  }
31
 
32
- if(!class_exists('\UltraCommunity\UltraCommHooks')) {
33
- return;
34
- }
35
 
36
  if($this->getOption(GdbcUltraCommunityAdminModule::OPTION_LOGIN_FORM_PROTECTION_ACTIVATED))
37
  {
29
  return;
30
  }
31
 
32
+ // if(!class_exists('\UltraCommunity\UltraCommHooks')) {
33
+ // return;
34
+ // }
35
 
36
  if($this->getOption(GdbcUltraCommunityAdminModule::OPTION_LOGIN_FORM_PROTECTION_ACTIVATED))
37
  {
goodbye-captcha.php CHANGED
@@ -10,7 +10,7 @@
10
  * Plugin Name: WPBruiser
11
  * Plugin URI: http://www.wpbruiser.com
12
  * Description: An extremely powerful anti-spam plugin that blocks spambots without annoying captcha images.
13
- * Version: 3.1.12
14
  * Author: Mihai Chelaru
15
  * Author URI: http://www.wpbruiser.com
16
  * Text Domain: wp-bruiser
@@ -23,7 +23,7 @@ if(!class_exists('GoodByeCaptcha', false))
23
  {
24
  class GoodByeCaptcha
25
  {
26
- CONST PLUGIN_VERSION = '3.1.12';
27
  CONST PLUGIN_SLUG = 'wp-bruiser';
28
  CONST PLUGIN_NAME = 'WPBruiser';
29
  CONST PLUGIN_SITE_URL = 'http://www.wpbruiser.com';
10
  * Plugin Name: WPBruiser
11
  * Plugin URI: http://www.wpbruiser.com
12
  * Description: An extremely powerful anti-spam plugin that blocks spambots without annoying captcha images.
13
+ * Version: 3.1.14
14
  * Author: Mihai Chelaru
15
  * Author URI: http://www.wpbruiser.com
16
  * Text Domain: wp-bruiser
23
  {
24
  class GoodByeCaptcha
25
  {
26
+ CONST PLUGIN_VERSION = '3.1.14';
27
  CONST PLUGIN_SLUG = 'wp-bruiser';
28
  CONST PLUGIN_NAME = 'WPBruiser';
29
  CONST PLUGIN_SITE_URL = 'http://www.wpbruiser.com';
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: captcha, antispam, anti-spam, spam, mailpoet, antispambot, brute force, comment spam, jetpack contact form, contact form 7, ninja forms, formidable forms, wp bruiser
5
  Requires at least: 4.0
6
  Tested up to: 4.9
7
- Stable tag: 3.1.12
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -221,7 +221,12 @@ Studies shown that visual CAPTCHAs take around 5-10 seconds to complete and audi
221
  * Refreshed Incapsula, Amazon and Cloudflare trusted IPs ranges
222
 
223
  == Changelog ==
224
- * Added integration with [Ultra Community](https://wordpress.org/plugins/ultra-community/) Membership plugin
 
 
 
 
 
225
 
226
  = 3.1.12 =
227
  **Fixes**
4
  Tags: captcha, antispam, anti-spam, spam, mailpoet, antispambot, brute force, comment spam, jetpack contact form, contact form 7, ninja forms, formidable forms, wp bruiser
5
  Requires at least: 4.0
6
  Tested up to: 4.9
7
+ Stable tag: 3.1.14
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
221
  * Refreshed Incapsula, Amazon and Cloudflare trusted IPs ranges
222
 
223
  == Changelog ==
224
+ * Added integration with [HTML Forms Plugin](https://wordpress.org/plugins/html-forms/)
225
+
226
+ = 3.1.14 =
227
+ **Improvements**
228
+ - Integrated with [HTML Forms Plugin](https://wordpress.org/plugins/html-forms/)
229
+
230
 
231
  = 3.1.12 =
232
  **Fixes**