Spam protection, AntiSpam, FireWall by CleanTalk - Version 2.57

Version Description

2014-07-29 = * Improved anti spam protection for comments. The plugin now proccessing website url in the comments form. * Fixed sign remove logic for approved comments. Previous version doesn't cut sign for comments approved via AJAX call in WordPress backend. * Fixed switching to SSL for comments. Previous version doesn't use secured connection for comments.

Download this release

Release Info

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

Code changes from version 2.56 to 2.57

Files changed (3) hide show
  1. cleantalk-admin.php +1 -0
  2. cleantalk.php +20 -10
  3. readme.txt +12 -2
cleantalk-admin.php CHANGED
@@ -321,6 +321,7 @@ function ct_valid_key($apikey = null) {
321
  function ct_comment_approved($comment_object) {
322
  $comment = get_comment($comment_object->comment_ID, 'ARRAY_A');
323
  $hash = get_comment_meta($comment_object->comment_ID, 'ct_hash', true);
 
324
  $comment['comment_content'] = ct_unmark_red($comment['comment_content']);
325
  $comment['comment_content'] = ct_feedback($hash, $comment['comment_content'], 1);
326
  $comment['comment_approved'] = 1;
321
  function ct_comment_approved($comment_object) {
322
  $comment = get_comment($comment_object->comment_ID, 'ARRAY_A');
323
  $hash = get_comment_meta($comment_object->comment_ID, 'ct_hash', true);
324
+
325
  $comment['comment_content'] = ct_unmark_red($comment['comment_content']);
326
  $comment['comment_content'] = ct_feedback($hash, $comment['comment_content'], 1);
327
  $comment['comment_approved'] = 1;
cleantalk.php CHANGED
@@ -3,14 +3,14 @@
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: 2.56
7
  Author: СleanTalk <welcome@cleantalk.ru>
8
  Author URI: http://cleantalk.org
9
  */
10
 
11
  define('CLEANTALK_PLUGIN_DIR', plugin_dir_path(__FILE__));
12
 
13
- $ct_agent_version = 'wordpress-256';
14
  $ct_plugin_name = 'Anti-spam by CleanTalk';
15
  $ct_checkjs_frm = 'ct_checkjs_frm';
16
  $ct_checkjs_register_form = 'ct_checkjs_register_form';
@@ -123,13 +123,17 @@ add_filter('si_contact_form_validate', 'ct_si_contact_form_validate');
123
  // Login form - for notifications only
124
  add_filter('login_message', 'ct_login_message');
125
 
126
- if (is_admin() && !(defined( 'DOING_AJAX' ) && DOING_AJAX)) {
127
  require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-admin.php');
 
 
 
 
 
 
128
 
129
- add_action('admin_init', 'ct_admin_init', 1);
130
- add_action('admin_menu', 'ct_admin_add_page');
131
  add_action('admin_enqueue_scripts', 'ct_enqueue_scripts');
132
- add_action('admin_notices', 'admin_notice_message');
133
  add_action('comment_unapproved_to_approved', 'ct_comment_approved'); // param - comment object
134
  add_action('comment_approved_to_unapproved', 'ct_comment_unapproved'); // param - comment object
135
  add_action('comment_unapproved_to_spam', 'ct_comment_spam'); // param - comment object
@@ -267,8 +271,9 @@ function ct_feedback($hash, $message = null, $allow) {
267
  $ct->server_changed = $config['ct_server_changed'];
268
 
269
  if (empty($hash)) {
270
- $hash = $ct->getCleantalkCommentHash($message);
271
  }
 
272
  if ($message !== null) {
273
  $resultMessage = $ct->delCleantalkComment($message);
274
  }
@@ -380,7 +385,7 @@ function ct_base_call($params = array()) {
380
  $ct->server_url = $options['server'];
381
  $ct->server_ttl = $config['ct_server_ttl'];
382
  $ct->server_changed = $config['ct_server_changed'];
383
- $ct->ssl_on = $config['ssl_on'];
384
 
385
  $ct_request = new CleantalkRequest();
386
 
@@ -644,6 +649,10 @@ function ct_preprocess_comment($comment) {
644
  $checkjs = js_test('ct_checkjs', $_POST);
645
 
646
  $example = null;
 
 
 
 
647
 
648
  $post_info['comment_type'] = $comment['comment_type'];
649
  $post_info['post_url'] = ct_post_url(null, $comment_post_id);
@@ -677,7 +686,8 @@ function ct_preprocess_comment($comment) {
677
  'sender_email' => $comment['comment_author_email'],
678
  'sender_nickname' => $comment['comment_author'],
679
  'post_info' => $post_info,
680
- 'checkjs' => $checkjs
 
681
  ));
682
  $ct = $ct_base_call_result['ct'];
683
  $ct_result = $ct_base_call_result['ct_result'];
@@ -1536,7 +1546,7 @@ function ct_s2member_registration_test() {
1536
  $ct->server_url = $options['server'];
1537
  $ct->server_ttl = $config['ct_server_ttl'];
1538
  $ct->server_changed = $config['ct_server_changed'];
1539
- $ct->ssl_on = $config['ssl_on'];
1540
 
1541
  $ct_request = new CleantalkRequest();
1542
 
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: 2.57
7
  Author: СleanTalk <welcome@cleantalk.ru>
8
  Author URI: http://cleantalk.org
9
  */
10
 
11
  define('CLEANTALK_PLUGIN_DIR', plugin_dir_path(__FILE__));
12
 
13
+ $ct_agent_version = 'wordpress-257';
14
  $ct_plugin_name = 'Anti-spam by CleanTalk';
15
  $ct_checkjs_frm = 'ct_checkjs_frm';
16
  $ct_checkjs_register_form = 'ct_checkjs_register_form';
123
  // Login form - for notifications only
124
  add_filter('login_message', 'ct_login_message');
125
 
126
+ if (is_admin()) {
127
  require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-admin.php');
128
+
129
+ if (!(defined( 'DOING_AJAX' ) && DOING_AJAX)) {
130
+ add_action('admin_init', 'ct_admin_init', 1);
131
+ add_action('admin_menu', 'ct_admin_add_page');
132
+ add_action('admin_notices', 'admin_notice_message');
133
+ }
134
 
 
 
135
  add_action('admin_enqueue_scripts', 'ct_enqueue_scripts');
136
+ add_action('comment_unapproved_to_approvecomment', 'ct_comment_approved'); // param - comment object
137
  add_action('comment_unapproved_to_approved', 'ct_comment_approved'); // param - comment object
138
  add_action('comment_approved_to_unapproved', 'ct_comment_unapproved'); // param - comment object
139
  add_action('comment_unapproved_to_spam', 'ct_comment_spam'); // param - comment object
271
  $ct->server_changed = $config['ct_server_changed'];
272
 
273
  if (empty($hash)) {
274
+ $hash = $ct->getCleantalkCommentHash($message);
275
  }
276
+
277
  if ($message !== null) {
278
  $resultMessage = $ct->delCleantalkComment($message);
279
  }
385
  $ct->server_url = $options['server'];
386
  $ct->server_ttl = $config['ct_server_ttl'];
387
  $ct->server_changed = $config['ct_server_changed'];
388
+ $ct->ssl_on = $options['ssl_on'];
389
 
390
  $ct_request = new CleantalkRequest();
391
 
649
  $checkjs = js_test('ct_checkjs', $_POST);
650
 
651
  $example = null;
652
+
653
+ $sender_info = array(
654
+ 'sender_url' => @$comment['comment_author_url']
655
+ );
656
 
657
  $post_info['comment_type'] = $comment['comment_type'];
658
  $post_info['post_url'] = ct_post_url(null, $comment_post_id);
686
  'sender_email' => $comment['comment_author_email'],
687
  'sender_nickname' => $comment['comment_author'],
688
  'post_info' => $post_info,
689
+ 'checkjs' => $checkjs,
690
+ 'sender_info' => $sender_info
691
  ));
692
  $ct = $ct_base_call_result['ct'];
693
  $ct_result = $ct_base_call_result['ct_result'];
1546
  $ct->server_url = $options['server'];
1547
  $ct->server_ttl = $config['ct_server_ttl'];
1548
  $ct->server_changed = $config['ct_server_changed'];
1549
+ $ct->ssl_on = $options['ssl_on'];
1550
 
1551
  $ct_request = new CleantalkRequest();
1552
 
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
4
  Requires at least: 3.0
5
  Tested up to: 4.0
6
- Stable tag: 2.56
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -143,6 +143,11 @@ WordPress 3.0 at least. PHP 4, 5 with CURL or file_get_contents() function and e
143
  1. Anti spam stopped spam bot at the registration form.
144
 
145
  == Changelog ==
 
 
 
 
 
146
  = 2.56 2014-07-21 =
147
  * Fixed account status check logic. Previous version makes unnecessary test API calls when the plugin asks account status check.
148
 
@@ -356,6 +361,11 @@ WordPress 3.0 at least. PHP 4, 5 with CURL or file_get_contents() function and e
356
  * First version
357
 
358
  == Upgrade Notice ==
 
 
 
 
 
359
  = 2.56 2014-07-21 =
360
  * Fixed account status check logic. Previous version makes unnecessary test API calls when the plugin asks account status check.
361
 
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
4
  Requires at least: 3.0
5
  Tested up to: 4.0
6
+ Stable tag: 2.57
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
143
  1. Anti spam stopped spam bot at the registration form.
144
 
145
  == Changelog ==
146
+ = 2.57 2014-07-29 =
147
+ * Improved anti spam protection for comments. The plugin now proccessing website url in the comments form.
148
+ * Fixed sign remove logic for approved comments. Previous version doesn't cut sign for comments approved via AJAX call in WordPress backend.
149
+ * Fixed switching to SSL for comments. Previous version doesn't use secured connection for comments.
150
+
151
  = 2.56 2014-07-21 =
152
  * Fixed account status check logic. Previous version makes unnecessary test API calls when the plugin asks account status check.
153
 
361
  * First version
362
 
363
  == Upgrade Notice ==
364
+ = 2.57 2014-07-29 =
365
+ * Improved anti spam protection for comments. The plugin now proccessing website url in the comments form.
366
+ * Fixed sign remove logic for approved comments. Previous version doesn't cut sign for comments approved via AJAX call in WordPress backend.
367
+ * Fixed switching to SSL for comments. Previous version doesn't use secured connection for comments.
368
+
369
  = 2.56 2014-07-21 =
370
  * Fixed account status check logic. Previous version makes unnecessary test API calls when the plugin asks account status check.
371