Spam protection, AntiSpam, FireWall by CleanTalk - Version 5.6

Version Description

2015-05-11 = * Fixed translation * Fixed bulk comments anti-spam checking * Added option for disabling antispam statistics in adminbar * Some security fixes

Download this release

Release Info

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

Code changes from version 5.4 to 5.6

cleantalk-admin.php CHANGED
@@ -198,6 +198,7 @@ function ct_admin_init() {
198
  add_settings_field('cleantalk_comments_test', __('Comments form', 'cleantalk'), 'ct_input_comments_test', 'cleantalk', 'cleantalk_settings_anti_spam');
199
  add_settings_field('cleantalk_contact_forms_test', __('Contact forms', 'cleantalk'), 'ct_input_contact_forms_test', 'cleantalk', 'cleantalk_settings_anti_spam');
200
  add_settings_field('cleantalk_general_contact_forms_test', __('Custom contact forms', 'cleantalk'), 'ct_input_general_contact_forms_test', 'cleantalk', 'cleantalk_settings_anti_spam');
 
201
  }
202
 
203
  /**
@@ -218,7 +219,18 @@ add_action( 'admin_bar_menu', 'ct_add_admin_menu', 999 );
218
 
219
  function ct_add_admin_menu( $wp_admin_bar ) {
220
  // add a parent item
221
- if ( current_user_can('activate_plugins') )
 
 
 
 
 
 
 
 
 
 
 
222
  {
223
  $ct_data=ct_get_data();
224
  $args = array(
@@ -230,7 +242,7 @@ function ct_add_admin_menu( $wp_admin_bar ) {
230
  // add a child item to our parent item
231
  $args = array(
232
  'id' => 'ct_dashboard_link',
233
- 'title' => '<a href="https://cleantalk.org/my/?user_token='.@$ct_data['user_token'].'" target="_blank">CleanTalk dashboard</a>',
234
  'parent' => 'ct_parent_node'
235
  );
236
  $wp_admin_bar->add_node( $args );
@@ -310,7 +322,8 @@ function ct_section_settings_state() {
310
  print "</div>";
311
  if($test_failed)
312
  {
313
- print "Testing is failed, check settings. Tech support <a target=_blank href='mailto:support@cleantalk.org'>support@cleantalk.org</a>";
 
314
  }
315
  return true;
316
  }
@@ -417,6 +430,28 @@ function ct_input_remove_old_spam() {
417
  admin_addDescriptionsFields(sprintf(__('Delete spam comments older than %d days.', 'cleantalk'), $ct_options['spam_store_days']));
418
  }
419
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
420
  /**
421
  * Admin callback function - Plugin parameters validator
422
  */
@@ -475,36 +510,45 @@ function admin_notice_message(){
475
  }
476
 
477
  $show_notice = true;
 
 
 
 
 
 
 
 
 
478
 
479
- if ($show_notice && $show_ct_notice_autokey) {
480
  echo '<div class="error"><h3>' . sprintf(__("Unable to get Access key automatically: %s", 'cleantalk'), $ct_notice_autokey_value);
481
  echo " <a target='__blank' style='margin-left: 10px' href='https://cleantalk.org/register?platform=wordpress&email=".urlencode(get_option('admin_email'))."&website=".urlencode(parse_url(get_option('siteurl'),PHP_URL_HOST))."'>".__('Click here to get access key manually', 'cleantalk').'</a></h3></div>';
482
  }
483
 
484
- if ($show_notice && ct_valid_key($ct_options['apikey']) === false) {
485
  echo '<div class="error"><h3>' . sprintf(__("Please enter Access Key in %s settings to enable anti spam protection!", 'cleantalk'), "<a href=\"options-general.php?page=cleantalk\">CleanTalk plugin</a>") . '</h3></div>';
486
  $show_notice = false;
487
  }
488
 
489
- if ($show_notice && $show_ct_notice_trial) {
490
  echo '<div class="error"><h3>' . sprintf(__("%s trial period ends, please upgrade to %s!", 'cleantalk'), "<a href=\"options-general.php?page=cleantalk\">$ct_plugin_name</a>", "<a href=\"http://cleantalk.org/my/bill/recharge?utm_source=wp-backend&utm_medium=cpc&utm_campaign=WP%20backend%20trial$user_token\" target=\"_blank\"><b>premium version</b></a>") . '</h3></div>';
491
  $show_notice = false;
492
  }
493
 
494
- if ($show_notice && $show_ct_notice_renew) {
495
  $button_html = "<a href=\"http://cleantalk.org/my/bill/recharge?utm_source=wp-backend&utm_medium=cpc&utm_campaign=WP%20backend%20renew$user_token\" target=\"_blank\">" . '<input type="button" class="button button-primary" value="' . __('RENEW ANTI-SPAM', 'cleantalk') . '" />' . "</a>";
496
  echo '<div class="updated"><h3>' . sprintf(__("Please renew your anti-spam license for %s.", 'cleantalk'), "<a href=\"http://cleantalk.org/my/bill/recharge?utm_source=wp-backend&utm_medium=cpc&utm_campaign=WP%20backend%20renew$user_token\" target=\"_blank\"><b>" . __('next year', 'cleantalk') ."</b></a>") . '<br /><br />' . $button_html . '</h3></div>';
497
  $show_notice = false;
498
  }
499
 
500
- if ($show_notice && $show_ct_notice_online != '') {
501
  if($show_ct_notice_online === 'Y'){
502
  echo '<div class="updated"><h3><b>';
503
  echo __("Don’t forget to disable CAPTCHA if you have it!", 'cleantalk');
504
  echo '</b></h3></div>';
505
  }
506
 
507
- if($show_ct_notice_online === 'N'){
508
  echo '<div class="error"><h3><b>';
509
  echo __("Wrong <a href=\"options-general.php?page=cleantalk\"><b style=\"color: #49C73B;\">Clean</b><b style=\"color: #349ebf;\">Talk</b> access key</a>! Please check it or ask <a target=\"_blank\" href=\"https://cleantalk.org/forum/\">support</a>.", 'cleantalk');
510
  echo '</b></h3></div>';
198
  add_settings_field('cleantalk_comments_test', __('Comments form', 'cleantalk'), 'ct_input_comments_test', 'cleantalk', 'cleantalk_settings_anti_spam');
199
  add_settings_field('cleantalk_contact_forms_test', __('Contact forms', 'cleantalk'), 'ct_input_contact_forms_test', 'cleantalk', 'cleantalk_settings_anti_spam');
200
  add_settings_field('cleantalk_general_contact_forms_test', __('Custom contact forms', 'cleantalk'), 'ct_input_general_contact_forms_test', 'cleantalk', 'cleantalk_settings_anti_spam');
201
+ add_settings_field('cleantalk_show_adminbar', __('Show statistics in admin bar', 'cleantalk'), 'ct_input_show_adminbar', 'cleantalk', 'cleantalk_settings_anti_spam');
202
  }
203
 
204
  /**
219
 
220
  function ct_add_admin_menu( $wp_admin_bar ) {
221
  // add a parent item
222
+ global $ct_options, $ct_data;
223
+
224
+ if(isset($ct_options['show_adminbar']))
225
+ {
226
+ $value = @intval($ct_options['show_adminbar']);
227
+ }
228
+ else
229
+ {
230
+ $value=1;
231
+ }
232
+
233
+ if ( current_user_can('activate_plugins')&&$value==1 )
234
  {
235
  $ct_data=ct_get_data();
236
  $args = array(
242
  // add a child item to our parent item
243
  $args = array(
244
  'id' => 'ct_dashboard_link',
245
+ 'title' => '<a href="https://cleantalk.org/my/?user_token='.@$ct_data['user_token'].'&utm_source=wp-backend&utm_medium=admin-bar" target="_blank">CleanTalk dashboard</a>',
246
  'parent' => 'ct_parent_node'
247
  );
248
  $wp_admin_bar->add_node( $args );
322
  print "</div>";
323
  if($test_failed)
324
  {
325
+ //print "Testing is failed, check settings. Tech support <a target=_blank href='mailto:support@cleantalk.org'>support@cleantalk.org</a>";
326
+ print __("Testing is failed, check settings. Tech support <a target=_blank href='mailto:support@cleantalk.org'>support@cleantalk.org</a>", 'cleantalk');
327
  }
328
  return true;
329
  }
430
  admin_addDescriptionsFields(sprintf(__('Delete spam comments older than %d days.', 'cleantalk'), $ct_options['spam_store_days']));
431
  }
432
 
433
+ /**
434
+ * Admin callback function - Displays inputs of 'Show statistics in adminbar' plugin parameter
435
+ *
436
+ * @return null
437
+ */
438
+ function ct_input_show_adminbar() {
439
+ global $ct_options, $ct_data;
440
+
441
+ if(isset($ct_options['show_adminbar']))
442
+ {
443
+ $value = @intval($ct_options['show_adminbar']);
444
+ }
445
+ else
446
+ {
447
+ $value=1;
448
+ }
449
+ echo "<input type='radio' id='cleantalk_show_adminbar1' name='cleantalk_settings[show_adminbar]' value='1' " . ($value == '1' ? 'checked' : '') . " /><label for='cleantalk_show_adminbar1'> " . __('Yes') . "</label>";
450
+ echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
451
+ echo "<input type='radio' id='cleantalk_show_adminbar0' name='cleantalk_settings[show_adminbar]' value='0' " . ($value == '0' ? 'checked' : '') . " /><label for='cleantalk_show_adminbar0'> " . __('No') . "</label>";
452
+ admin_addDescriptionsFields(sprintf(__('Show statistics in admin bar.', 'cleantalk'), $ct_options['spam_store_days']));
453
+ }
454
+
455
  /**
456
  * Admin callback function - Plugin parameters validator
457
  */
510
  }
511
 
512
  $show_notice = true;
513
+
514
+ if(current_user_can('activate_plugins'))
515
+ {
516
+ $value = 1;
517
+ }
518
+ else
519
+ {
520
+ $value = 0;
521
+ }
522
 
523
+ if ($show_notice && $show_ct_notice_autokey && $value==1) {
524
  echo '<div class="error"><h3>' . sprintf(__("Unable to get Access key automatically: %s", 'cleantalk'), $ct_notice_autokey_value);
525
  echo " <a target='__blank' style='margin-left: 10px' href='https://cleantalk.org/register?platform=wordpress&email=".urlencode(get_option('admin_email'))."&website=".urlencode(parse_url(get_option('siteurl'),PHP_URL_HOST))."'>".__('Click here to get access key manually', 'cleantalk').'</a></h3></div>';
526
  }
527
 
528
+ if ($show_notice && ct_valid_key($ct_options['apikey']) === false && $value==1) {
529
  echo '<div class="error"><h3>' . sprintf(__("Please enter Access Key in %s settings to enable anti spam protection!", 'cleantalk'), "<a href=\"options-general.php?page=cleantalk\">CleanTalk plugin</a>") . '</h3></div>';
530
  $show_notice = false;
531
  }
532
 
533
+ if ($show_notice && $show_ct_notice_trial && $value==1) {
534
  echo '<div class="error"><h3>' . sprintf(__("%s trial period ends, please upgrade to %s!", 'cleantalk'), "<a href=\"options-general.php?page=cleantalk\">$ct_plugin_name</a>", "<a href=\"http://cleantalk.org/my/bill/recharge?utm_source=wp-backend&utm_medium=cpc&utm_campaign=WP%20backend%20trial$user_token\" target=\"_blank\"><b>premium version</b></a>") . '</h3></div>';
535
  $show_notice = false;
536
  }
537
 
538
+ if ($show_notice && $show_ct_notice_renew && $value==1) {
539
  $button_html = "<a href=\"http://cleantalk.org/my/bill/recharge?utm_source=wp-backend&utm_medium=cpc&utm_campaign=WP%20backend%20renew$user_token\" target=\"_blank\">" . '<input type="button" class="button button-primary" value="' . __('RENEW ANTI-SPAM', 'cleantalk') . '" />' . "</a>";
540
  echo '<div class="updated"><h3>' . sprintf(__("Please renew your anti-spam license for %s.", 'cleantalk'), "<a href=\"http://cleantalk.org/my/bill/recharge?utm_source=wp-backend&utm_medium=cpc&utm_campaign=WP%20backend%20renew$user_token\" target=\"_blank\"><b>" . __('next year', 'cleantalk') ."</b></a>") . '<br /><br />' . $button_html . '</h3></div>';
541
  $show_notice = false;
542
  }
543
 
544
+ if ($show_notice && $show_ct_notice_online != '' && $value==1) {
545
  if($show_ct_notice_online === 'Y'){
546
  echo '<div class="updated"><h3><b>';
547
  echo __("Don’t forget to disable CAPTCHA if you have it!", 'cleantalk');
548
  echo '</b></h3></div>';
549
  }
550
 
551
+ if($show_ct_notice_online === 'N' && $value==1){
552
  echo '<div class="error"><h3><b>';
553
  echo __("Wrong <a href=\"options-general.php?page=cleantalk\"><b style=\"color: #49C73B;\">Clean</b><b style=\"color: #349ebf;\">Talk</b> access key</a>! Please check it or ask <a target=\"_blank\" href=\"https://cleantalk.org/forum/\">support</a>.", 'cleantalk');
554
  echo '</b></h3></div>';
cleantalk-comments.php CHANGED
@@ -1,9 +1,13 @@
1
  <?php
 
2
  add_action('admin_menu', 'ct_add_comments_menu');
3
 
4
  function ct_add_comments_menu()
5
  {
6
- add_comments_page( __("Check for spam", 'cleantalk'), __("Check for spam", 'cleantalk'), 'read', 'ct_check_spam', 'ct_show_checkspam_page');
 
 
 
7
  }
8
 
9
  function ct_show_checkspam_page()
@@ -388,7 +392,7 @@ function ct_ajax_delete_checked()
388
  check_ajax_referer( 'ct_secret_nonce', 'security' );
389
  foreach($_POST['ids'] as $key=>$value)
390
  {
391
- wp_delete_comment($value, true);
392
  }
393
  die();
394
  }
@@ -409,7 +413,7 @@ function ct_ajax_delete_all()
409
  $c_spam=get_comments($args_spam);
410
  for($i=0;$i<sizeof($c_spam);$i++)
411
  {
412
- wp_delete_comment($c_spam[$i]->comment_ID, true);
413
  }
414
  die();
415
  }
1
  <?php
2
+
3
  add_action('admin_menu', 'ct_add_comments_menu');
4
 
5
  function ct_add_comments_menu()
6
  {
7
+ if(current_user_can('activate_plugins'))
8
+ {
9
+ add_comments_page( __("Check for spam", 'cleantalk'), __("Check for spam", 'cleantalk'), 'read', 'ct_check_spam', 'ct_show_checkspam_page');
10
+ }
11
  }
12
 
13
  function ct_show_checkspam_page()
392
  check_ajax_referer( 'ct_secret_nonce', 'security' );
393
  foreach($_POST['ids'] as $key=>$value)
394
  {
395
+ wp_delete_comment($value, false);
396
  }
397
  die();
398
  }
413
  $c_spam=get_comments($args_spam);
414
  for($i=0;$i<sizeof($c_spam);$i++)
415
  {
416
+ wp_delete_comment($c_spam[$i]->comment_ID, false);
417
  }
418
  die();
419
  }
cleantalk-common.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- $ct_agent_version = 'wordpress-54';
4
  $ct_plugin_name = 'Anti-spam by CleanTalk';
5
  $ct_checkjs_frm = 'ct_checkjs_frm';
6
  $ct_checkjs_register_form = 'ct_checkjs_register_form';
@@ -167,6 +167,12 @@ function ct_base_call($params = array()) {
167
  $ct_request->js_on = $params['checkjs'];
168
  $ct_request->submit_time = $submit_time;
169
  $ct_request->post_info = $params['post_info'];
 
 
 
 
 
 
170
 
171
  $ct_result = $ct->isAllowMessage($ct_request);
172
  if ($ct->server_change) {
@@ -186,6 +192,16 @@ function ct_base_call($params = array()) {
186
  }
187
  else
188
  {
 
 
 
 
 
 
 
 
 
 
189
  ct_add_event('yes');
190
  }
191
 
@@ -528,4 +544,42 @@ function delete_spam_comments() {
528
  return null;
529
  }
530
 
531
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
 
3
+ $ct_agent_version = 'wordpress-56';
4
  $ct_plugin_name = 'Anti-spam by CleanTalk';
5
  $ct_checkjs_frm = 'ct_checkjs_frm';
6
  $ct_checkjs_register_form = 'ct_checkjs_register_form';
167
  $ct_request->js_on = $params['checkjs'];
168
  $ct_request->submit_time = $submit_time;
169
  $ct_request->post_info = $params['post_info'];
170
+ if(isset($ct_data['last_error_no']))
171
+ {
172
+ $ct_request->last_error_no=$ct_data['last_error_no'];
173
+ $ct_request->last_error_time=$ct_data['last_error_time'];
174
+ $ct_request->last_error_text=$ct_data['last_error_text'];
175
+ }
176
 
177
  $ct_result = $ct->isAllowMessage($ct_request);
178
  if ($ct->server_change) {
192
  }
193
  else
194
  {
195
+ if(isset($ct_result->errno))
196
+ {
197
+ if($ct_result->errno==1||$ct_result->errno==0)
198
+ {
199
+ $ct_data['last_error_no']=$ct_result->errno;
200
+ $ct_data['last_error_time']=time();
201
+ $ct_data['last_error_text']=$ct_result->errstr;
202
+ update_option('cleantalk_data', $ct_data);
203
+ }
204
+ }
205
  ct_add_event('yes');
206
  }
207
 
544
  return null;
545
  }
546
 
547
+ function ct_get_fields_any(&$email,&$message,&$nickname,&$subject, &$contact,$arr)
548
+ {
549
+ $skip_params = array(
550
+ 'ipn_track_id', // PayPal IPN #
551
+ 'txn_type', // PayPal transaction type
552
+ 'payment_status', // PayPal payment status
553
+ );
554
+ foreach($arr as $key=>$value)
555
+ {
556
+ if(!is_array($value))
557
+ {
558
+ if (in_array($key, $skip_params) || preg_match("/^ct_checkjs/", $key)) {
559
+ $contact = false;
560
+ }
561
+ if ($email === '' && preg_match("/^\S+@\S+\.\S+$/", $value))
562
+ {
563
+ $email = $value;
564
+ }
565
+ else if ($nickname === '' && ct_get_data_from_submit($value, 'name'))
566
+ {
567
+ $nickname = $value;
568
+ }
569
+ else if ($subject === '' && ct_get_data_from_submit($value, 'subject'))
570
+ {
571
+ $subject = $value;
572
+ }
573
+ else
574
+ {
575
+ $message.="$value\n";
576
+ }
577
+ }
578
+ else
579
+ {
580
+ ct_get_fields_any($email, $message, $nickname, $subject, $contact, $value);
581
+ }
582
+ }
583
+ }
584
+
585
+ ?>
cleantalk-public.php CHANGED
@@ -1372,12 +1372,19 @@ function ct_s2member_registration_test() {
1372
  * General test for any contact form
1373
  */
1374
  function ct_contact_form_validate () {
1375
- global $pagenow;
 
 
 
 
 
 
 
 
1376
 
1377
  if ($_SERVER['REQUEST_METHOD'] != 'POST' ||
1378
  (isset($_POST['log']) && isset($_POST['pwd']) && isset($pagenow) && $pagenow == 'wp-login.php') || // WordPress log in form
1379
- (isset($pagenow) && $pagenow == 'wp-login.php' && isset($_GET['action']) && $_GET['action']=='lostpassword') ||
1380
- defined('JETPACK__VERSION')
1381
  ) {
1382
  return null;
1383
  }
@@ -1390,56 +1397,17 @@ function ct_contact_form_validate () {
1390
  $post_info = '';
1391
  }
1392
 
1393
- $sender_email = null;
1394
- $sender_nickname = null;
1395
  $subject = '';
1396
  $message = '';
1397
  $contact_form = true;
1398
-
1399
- $skip_params = array(
1400
- 'ipn_track_id', // PayPal IPN #
1401
- 'txn_type', // PayPal transaction type
1402
- 'payment_status', // PayPal payment status
1403
- );
1404
- if (is_array($_POST)) {
1405
- foreach ($_POST as $k => $v) {
1406
- if (in_array($k, $skip_params) || preg_match("/^ct_checkjs/", $k)) {
1407
- $contact_form = false;
1408
- break;
1409
- }
1410
-
1411
- if ($sender_email === null && isset($v)) {
1412
- if (is_string($v) && preg_match("/^\S+@\S+\.\S+$/", $v)) {
1413
- $sender_email = $v;
1414
- }
1415
-
1416
- // Looing email address in arrays
1417
- if (is_array($v)) {
1418
- foreach ($v as $v2) {
1419
- if ($sender_email) {
1420
- continue;
1421
- }
1422
-
1423
- if (is_string($v2) && preg_match("/^\S+@\S+\.\S+$/", $v2)) {
1424
- $sender_email = $v2;
1425
- }
1426
- }
1427
- }
1428
- }
1429
- if ($sender_nickname === null && ct_get_data_from_submit($k, 'name')) {
1430
- $sender_nickname = $v;
1431
- }
1432
- if ($message === '' && ct_get_data_from_submit($k, 'message')) {
1433
- $message = $v;
1434
- }
1435
- if ($subject === '' && ct_get_data_from_submit($k, 'subject')) {
1436
- $subject = $v;
1437
- }
1438
- }
1439
- }
1440
 
1441
  // Skip submission if no data found
1442
- if (!$sender_email || !$contact_form) {
1443
  return false;
1444
  }
1445
 
1372
  * General test for any contact form
1373
  */
1374
  function ct_contact_form_validate () {
1375
+ global $pagenow,$cleantalk_executed;
1376
+ if($cleantalk_executed)
1377
+ {
1378
+ return null;
1379
+ }
1380
+ /*if ((defined( 'DOING_AJAX' ) && DOING_AJAX))
1381
+ {
1382
+ return null;
1383
+ }*/
1384
 
1385
  if ($_SERVER['REQUEST_METHOD'] != 'POST' ||
1386
  (isset($_POST['log']) && isset($_POST['pwd']) && isset($pagenow) && $pagenow == 'wp-login.php') || // WordPress log in form
1387
+ (isset($pagenow) && $pagenow == 'wp-login.php' && isset($_GET['action']) && $_GET['action']=='lostpassword')
 
1388
  ) {
1389
  return null;
1390
  }
1397
  $post_info = '';
1398
  }
1399
 
1400
+ $sender_email = '';
1401
+ $sender_nickname = '';
1402
  $subject = '';
1403
  $message = '';
1404
  $contact_form = true;
1405
+
1406
+ ct_get_fields_any($sender_email, $message, $sender_nickname, $subject, $contact_form, $_POST);
1407
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1408
 
1409
  // Skip submission if no data found
1410
+ if ($sender_email===''|| !$contact_form) {
1411
  return false;
1412
  }
1413
 
cleantalk-stats.js CHANGED
@@ -11,7 +11,7 @@ function ct_update_stats()
11
  dataType: 'json',
12
  success: function(msg){
13
  jQuery('#ct_stats').html('<span>' + msg.stat_accepted + '</span> / <span>' + msg.stat_blocked + '</span>');
14
- setTimeout(ct_update_stats,5000);
15
  }
16
  });
17
  }
11
  dataType: 'json',
12
  success: function(msg){
13
  jQuery('#ct_stats').html('<span>' + msg.stat_accepted + '</span> / <span>' + msg.stat_blocked + '</span>');
14
+ setTimeout(ct_update_stats,60000);
15
  }
16
  });
17
  }
cleantalk.class.php CHANGED
@@ -190,6 +190,24 @@ class CleantalkRequest {
190
  * @var string
191
  */
192
  public $all_headers = null;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193
 
194
  /**
195
  * User message
190
  * @var string
191
  */
192
  public $all_headers = null;
193
+
194
+ /**
195
+ * Last error number
196
+ * @var integer
197
+ */
198
+ public $last_error_no = null;
199
+
200
+ /**
201
+ * Last error time
202
+ * @var integer
203
+ */
204
+ public $last_error_time = null;
205
+
206
+ /**
207
+ * Last error text
208
+ * @var string
209
+ */
210
+ public $last_error_text = null;
211
 
212
  /**
213
  * User message
cleantalk.php CHANGED
@@ -3,11 +3,12 @@
3
  Plugin Name: Anti-spam by CleanTalk
4
  Plugin URI: http://cleantalk.org
5
  Description: Max power, all-in-one, captcha less, premium anti-spam plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms.
6
- Version: 5.4
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
- $cleantalk_plugin_version='5.4';
 
11
 
12
  if(!defined('CLEANTALK_PLUGIN_DIR')){
13
  define('CLEANTALK_PLUGIN_DIR', plugin_dir_path(__FILE__));
@@ -114,7 +115,7 @@ function ct_plugin_redirect()
114
 
115
  function ct_add_event($event_type)
116
  {
117
- global $ct_data;
118
  $ct_data = ct_get_data();
119
  $t=time();
120
  if($event_type=='yes')
@@ -127,6 +128,7 @@ function ct_add_event($event_type)
127
  }
128
  $ct_data['stat_all']++;
129
  update_option('cleantalk_data', $ct_data);
 
130
  }
131
 
132
 
3
  Plugin Name: Anti-spam by CleanTalk
4
  Plugin URI: http://cleantalk.org
5
  Description: Max power, all-in-one, captcha less, premium anti-spam plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms.
6
+ Version: 5.6
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
+ $cleantalk_plugin_version='5.6';
11
+ $cleantalk_executed=false;
12
 
13
  if(!defined('CLEANTALK_PLUGIN_DIR')){
14
  define('CLEANTALK_PLUGIN_DIR', plugin_dir_path(__FILE__));
115
 
116
  function ct_add_event($event_type)
117
  {
118
+ global $ct_data,$cleantalk_executed;
119
  $ct_data = ct_get_data();
120
  $t=time();
121
  if($event_type=='yes')
128
  }
129
  $ct_data['stat_all']++;
130
  update_option('cleantalk_data', $ct_data);
131
+ $cleantalk_executed=true;
132
  }
133
 
134
 
i18n/cleantalk-ru_RU.mo CHANGED
Binary file
readme.txt CHANGED
@@ -1,14 +1,14 @@
1
  === Anti-spam by CleanTalk - No Captcha, no comments & registrations spam ===
2
  Contributors: znaeff, shagimuratov, vlad-cleantalk
3
- Tags: akismet, anti-spam, antispam, bbpress spam, buddypress spam, captcha antispam, cf7 spam, comments spam, contact form spam, form, Formidable spam, jetpack spam, math, registration spam, s2member spam, signup spam, spam, spammers, spammy, WooCommerce spam, wordpress spam, booking spam, order spam, subscriptions spam, comments, gravity spam, gravity forms spam, widget, widget antispam, registration
4
  Requires at least: 3.0
5
- Tested up to: 4.2
6
- Stable tag: 5.4
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
 
11
- Max power, all-in-one, premium anti-spam. No comments & registrations spam, no contact spam, protects any forms. Just install and forget spam.
12
 
13
  == Description ==
14
  No CAPTCHA, no questions, no counting animals, no puzzles, no math and no spam bots.
@@ -38,7 +38,7 @@ With the help of anti-spam CleanTalk you can check existing comments, to find an
38
  Spam is one of the most irritating factors. Spam become every year more and conventional anti-spam can no longer handle all the spam bots. CleanTalk prevents spam and automatically blocks it. You'll be surprised of effective protection against spam.
39
 
40
  = Anti-spam plugin info =
41
- CleanTalk is an anti-spam protection **4 in 1 for WordPress** that protects login, comments, contact and WooCommerce forms all at once. You don't need to install separate anti-spam plugins for each form. This allows your blog to work faster and save resources. After installation **you will forget about spam**, CleanTalk plugin will do all the work. You won't have to deal with spam, CleanTalk will do this for you automatically.
42
 
43
  CleanTalk is a transparent anti-spam protection, we provide detailed statistics of all entering comments and logins. You can always be sure that **there are no errors**. We have developed a mobile app for you to see anti-spam statistics wherever.
44
 
@@ -181,6 +181,16 @@ WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enab
181
  1. Setup Android/iOS app to have push notices when new legitiamte comments/registrations or contactcs appears on the website.
182
 
183
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
184
  = 5.4 2015-04-27 =
185
  * Some interface and functionality changes in plugin settings page
186
  * Added counter for anti-spam statistics in admin bar
@@ -550,6 +560,15 @@ WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enab
550
  * First version
551
 
552
  == Upgrade Notice ==
 
 
 
 
 
 
 
 
 
553
  = 5.4 2015-04-27 =
554
  * Some interface and functionality changes in plugin settings page
555
  * Added counter for anti-spam statistics in admin bar
1
  === Anti-spam by CleanTalk - No Captcha, no comments & registrations spam ===
2
  Contributors: znaeff, shagimuratov, vlad-cleantalk
3
+ Tags: akismet, anti-spam, antispam, bbpress spam, buddypress spam, captcha antispam, cf7 spam, comments spam, contact form spam, form, Formidable spam, jetpack spam, math, registration spam, s2member spam, signup spam, spam, spammers, spammy, WooCommerce spam, wordpress spam, booking spam, order spam, subscriptions spam, comments, gravity spam, gravity forms spam, widget, widget antispam, registration, spam pingbacks
4
  Requires at least: 3.0
5
+ Tested up to: 4.2.2
6
+ Stable tag: 5.6
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
 
11
+ Max power, all-in-one, premium anti-spam. No comments & registrations spam, no contact spam, protects any forms. Just install and forget spam.
12
 
13
  == Description ==
14
  No CAPTCHA, no questions, no counting animals, no puzzles, no math and no spam bots.
38
  Spam is one of the most irritating factors. Spam become every year more and conventional anti-spam can no longer handle all the spam bots. CleanTalk prevents spam and automatically blocks it. You'll be surprised of effective protection against spam.
39
 
40
  = Anti-spam plugin info =
41
+ CleanTalk is an anti-spam protection **4 in 1 for WordPress** that protects login, comments, contact and WooCommerce forms all at once. You don't need to install separate anti-spam plugins for each form. This allows your blog to work faster and save resources. After installation **you will forget about spam**, CleanTalk plugin will do all the work. You won't have to deal with spam, CleanTalk will do this for you automatically. 
42
 
43
  CleanTalk is a transparent anti-spam protection, we provide detailed statistics of all entering comments and logins. You can always be sure that **there are no errors**. We have developed a mobile app for you to see anti-spam statistics wherever.
44
 
181
  1. Setup Android/iOS app to have push notices when new legitiamte comments/registrations or contactcs appears on the website.
182
 
183
  == Changelog ==
184
+ = 5.6 2015-05-11 =
185
+ * Fixed translation
186
+ * Fixed bulk comments anti-spam checking
187
+ * Added option for disabling antispam statistics in adminbar
188
+ * Some security fixes
189
+
190
+ = 5.5 2015-04-29 =
191
+ * Fixed security issue
192
+ * Some interface fixes
193
+
194
  = 5.4 2015-04-27 =
195
  * Some interface and functionality changes in plugin settings page
196
  * Added counter for anti-spam statistics in admin bar
560
  * First version
561
 
562
  == Upgrade Notice ==
563
+ = 5.6 2015-05-11 =
564
+ * Fixed translation
565
+ * Fixed bulk comments anti-spam checking
566
+ * Added option for disabling antispam statistics in adminbar
567
+ * Some security fixes
568
+
569
+ = 5.5 2015-04-29
570
+ * Fixed security issue
571
+
572
  = 5.4 2015-04-27 =
573
  * Some interface and functionality changes in plugin settings page
574
  * Added counter for anti-spam statistics in admin bar