Spam protection, AntiSpam, FireWall by CleanTalk - Version 4.5

Version Description

2014-11-04 = * Fixed CF7 JavaScript bug. * Fixed rejects in bbPress guests comments.

Download this release

Release Info

Developer shagimuratov
Plugin Icon 128x128 Spam protection, AntiSpam, FireWall by CleanTalk
Version 4.5
Comparing to
See all releases

Code changes from version 4.4 to 4.5

Files changed (2) hide show
  1. cleantalk.php +25 -4
  2. readme.txt +9 -2
cleantalk.php CHANGED
@@ -3,20 +3,21 @@
3
  Plugin Name: Anti-spam by CleanTalk
4
  Plugin URI: http://cleantalk.org
5
  Description: Cloud antispam for comments, registrations and contacts. The plugin doesn't use CAPTCHA, Q&A, math, counting animals or quiz to stop spam bots.
6
- Version: 4.4
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
 
11
  define('CLEANTALK_PLUGIN_DIR', plugin_dir_path(__FILE__));
12
 
13
- $ct_agent_version = 'wordpress-44';
14
  $ct_plugin_name = 'Anti-spam by CleanTalk';
15
  $ct_checkjs_frm = 'ct_checkjs_frm';
16
  $ct_checkjs_register_form = 'ct_checkjs_register_form';
17
  $ct_session_request_id_label = 'request_id';
18
  $ct_session_register_ok_label = 'register_ok';
19
 
 
20
  $ct_cf7_comment = '';
21
 
22
  $ct_checkjs_jpcf = 'ct_checkjs_jpcf';
@@ -118,6 +119,7 @@ add_action('bp_before_registration_submit_buttons','ct_register_form');
118
  add_filter('bp_signup_validate', 'ct_registration_errors');
119
 
120
  // Contact Form7
 
121
  add_filter('wpcf7_spam', 'ct_wpcf7_spam');
122
 
123
  // JetPack Contact form
@@ -697,7 +699,7 @@ function ct_bbp_new_pre_content ($comment) {
697
  return $comment;
698
  }
699
 
700
- $checkjs = js_test('ct_checkjs', $_POST);
701
 
702
  $example = null;
703
 
@@ -1433,11 +1435,27 @@ function ct_contact_form_is_spam($form) {
1433
  }
1434
 
1435
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1436
  /**
1437
  * Test CF7 message for spam
1438
  */
1439
  function ct_wpcf7_spam($spam) {
1440
- global $wpdb, $current_user, $ct_agent_version, $ct_cf7_comment;
1441
 
1442
  $options = ct_get_options();
1443
  if ($spam === true)
@@ -1448,6 +1466,9 @@ function ct_wpcf7_spam($spam) {
1448
  }
1449
 
1450
  $checkjs = js_test('ct_checkjs', $_COOKIE);
 
 
 
1451
 
1452
  $post_info['comment_type'] = 'feedback';
1453
  $post_info = json_encode($post_info);
3
  Plugin Name: Anti-spam by CleanTalk
4
  Plugin URI: http://cleantalk.org
5
  Description: Cloud antispam for comments, registrations and contacts. The plugin doesn't use CAPTCHA, Q&A, math, counting animals or quiz to stop spam bots.
6
+ Version: 4.5
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
 
11
  define('CLEANTALK_PLUGIN_DIR', plugin_dir_path(__FILE__));
12
 
13
+ $ct_agent_version = 'wordpress-45';
14
  $ct_plugin_name = 'Anti-spam by CleanTalk';
15
  $ct_checkjs_frm = 'ct_checkjs_frm';
16
  $ct_checkjs_register_form = 'ct_checkjs_register_form';
17
  $ct_session_request_id_label = 'request_id';
18
  $ct_session_register_ok_label = 'register_ok';
19
 
20
+ $ct_checkjs_cf7 = 'ct_checkjs_cf7';
21
  $ct_cf7_comment = '';
22
 
23
  $ct_checkjs_jpcf = 'ct_checkjs_jpcf';
119
  add_filter('bp_signup_validate', 'ct_registration_errors');
120
 
121
  // Contact Form7
122
+ add_filter('wpcf7_form_elements', 'ct_wpcf7_form_elements');
123
  add_filter('wpcf7_spam', 'ct_wpcf7_spam');
124
 
125
  // JetPack Contact form
699
  return $comment;
700
  }
701
 
702
+ $checkjs = js_test('ct_checkjs', $_COOKIE);
703
 
704
  $example = null;
705
 
1435
  }
1436
 
1437
 
1438
+ /**
1439
+ * Inserts anti-spam hidden to CF7
1440
+ */
1441
+ function ct_wpcf7_form_elements($html) {
1442
+ global $wpdb, $current_user, $ct_checkjs_cf7;
1443
+
1444
+ $options = ct_get_options();
1445
+ if ($options['contact_forms_test'] == 0) {
1446
+ return $html;
1447
+ }
1448
+
1449
+ $html .= ct_add_hidden_fields(null, $ct_checkjs_cf7, true);
1450
+
1451
+ return $html;
1452
+ }
1453
+
1454
  /**
1455
  * Test CF7 message for spam
1456
  */
1457
  function ct_wpcf7_spam($spam) {
1458
+ global $wpdb, $current_user, $ct_agent_version, $ct_checkjs_cf7, $ct_cf7_comment;
1459
 
1460
  $options = ct_get_options();
1461
  if ($spam === true)
1466
  }
1467
 
1468
  $checkjs = js_test('ct_checkjs', $_COOKIE);
1469
+ if($checkjs != 1){
1470
+ $checkjs = js_test($ct_checkjs_cf7, $_POST);
1471
+ }
1472
 
1473
  $post_info['comment_type'] = 'feedback';
1474
  $post_info = json_encode($post_info);
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Anti-spam by CleanTalk ===
2
  Contributors: znaeff, shagimuratov
3
- Tags: antispam, anti-spam, anti spam, spam, spammers, captcha, comments, registration, contact form, blacklist, math, signup, formidable, bot, spam bots, spammy, s2member, wordpress, support, BuddyPress, bbpress, landing pages, fast secure contact form, WooCommerce, jetpack, cf7, form, akismet
4
  Requires at least: 3.0
5
  Tested up to: 4.0
6
- Stable tag: 4.4
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -148,6 +148,10 @@ WordPress 3.0 at least. PHP 4, 5 with CURL or file_get_contents() function and e
148
  1. Anti spam stopped spam bot at the CAPTCHA less registration form.
149
 
150
  == Changelog ==
 
 
 
 
151
  = 4.4 2014-10-29 =
152
  * Improved anti spam JS test for CF7.
153
  * Fixed 'noscript' text in FaceBook Like preview in Valenti theme.
@@ -413,6 +417,9 @@ WordPress 3.0 at least. PHP 4, 5 with CURL or file_get_contents() function and e
413
  * First version
414
 
415
  == Upgrade Notice ==
 
 
 
416
  = 4.4 2014-10-29 =
417
  Improved JS checking for CF7.
418
 
1
  === Anti-spam by CleanTalk ===
2
  Contributors: znaeff, shagimuratov
3
+ Tags: antispam, anti-spam, anti spam, spam, spammers, captcha, comments, registration, contact form, blacklist, math, signup, formidable, bot, spam bots, spammy, s2member, wordpress, support, BuddyPress, bbpress, landing pages, fast secure contact form, WooCommerce, jetpack, cf7, akismet
4
  Requires at least: 3.0
5
  Tested up to: 4.0
6
+ Stable tag: 4.5
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
148
  1. Anti spam stopped spam bot at the CAPTCHA less registration form.
149
 
150
  == Changelog ==
151
+ = 4.5 2014-11-04 =
152
+ * Fixed CF7 JavaScript bug.
153
+ * Fixed rejects in bbPress guests comments.
154
+
155
  = 4.4 2014-10-29 =
156
  * Improved anti spam JS test for CF7.
157
  * Fixed 'noscript' text in FaceBook Like preview in Valenti theme.
417
  * First version
418
 
419
  == Upgrade Notice ==
420
+ = 4.5 2014-11-04 =
421
+ Bug fixes for Contact form 7 and bbPress guests posting.
422
+
423
  = 4.4 2014-10-29 =
424
  Improved JS checking for CF7.
425