Spam protection, AntiSpam, FireWall by CleanTalk - Version 5.13

Version Description

2015-06-12 = * Closing notifocatiion for anti-spam renew * Fixed bulk antispam comment checking

Download this release

Release Info

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

Code changes from version 5.12 to 5.13

JSON.php CHANGED
@@ -801,6 +801,4 @@ if (class_exists('PEAR_Error')) {
801
  }
802
  }
803
 
804
- }
805
-
806
- ?>
801
  }
802
  }
803
 
804
+ }
 
 
cleantalk-admin.php CHANGED
@@ -2,6 +2,16 @@
2
 
3
  $ct_plugin_basename = 'cleantalk-spam-protect/cleantalk.php';
4
 
 
 
 
 
 
 
 
 
 
 
5
  require_once('cleantalk.class.php');
6
 
7
  // Timeout to get app server
@@ -545,6 +555,8 @@ input[type=submit] {padding: 10px; background: #3399FF; color: #fff; border:0 no
545
  */
546
  function admin_notice_message(){
547
  global $show_ct_notice_trial, $show_ct_notice_renew, $show_ct_notice_online, $show_ct_notice_autokey, $ct_notice_autokey_value, $ct_plugin_name, $ct_options, $ct_data;
 
 
548
 
549
  $user_token = '';
550
  if (isset($ct_data['user_token']) && $ct_data['user_token'] != '') {
@@ -576,10 +588,29 @@ function admin_notice_message(){
576
  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>';
577
  $show_notice = false;
578
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
579
 
580
- if ($show_notice && $show_ct_notice_renew && $value==1) {
581
  $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>";
582
- 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>';
583
  $show_notice = false;
584
  }
585
 
2
 
3
  $ct_plugin_basename = 'cleantalk-spam-protect/cleantalk.php';
4
 
5
+ if(isset($_GET['close_notice']))
6
+ {
7
+ global $ct_data, $pagenow;
8
+ $ct_data=ct_get_data();
9
+ $ct_data['next_notice_show']=time()+86400;
10
+ update_option('cleantalk_data', $ct_data);
11
+ $_SERVER["QUERY_STRING"]=str_replace("close_notice=1","",$_SERVER["QUERY_STRING"]);
12
+ header("Location: $pagenow?".$_SERVER["QUERY_STRING"]);
13
+ }
14
+
15
  require_once('cleantalk.class.php');
16
 
17
  // Timeout to get app server
555
  */
556
  function admin_notice_message(){
557
  global $show_ct_notice_trial, $show_ct_notice_renew, $show_ct_notice_online, $show_ct_notice_autokey, $ct_notice_autokey_value, $ct_plugin_name, $ct_options, $ct_data;
558
+
559
+ $ct_data=ct_get_data();
560
 
561
  $user_token = '';
562
  if (isset($ct_data['user_token']) && $ct_data['user_token'] != '') {
588
  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>';
589
  $show_notice = false;
590
  }
591
+
592
+ if(isset($ct_data['next_notice_show']))
593
+ {
594
+ $next_notice_show=$ct_data['next_notice_show'];
595
+ }
596
+ else
597
+ {
598
+ $next_notice_show=0;
599
+ }
600
+
601
+ $link=$_SERVER["QUERY_STRING"];
602
+ if($link!='')
603
+ {
604
+ $link="?".$link."&close_notice=1";
605
+ }
606
+ else
607
+ {
608
+ $link="?close_notice=1";
609
+ }
610
 
611
+ if ($show_notice && $show_ct_notice_renew && $value==1 && time()>$next_notice_show) {
612
  $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>";
613
+ echo '<div class="updated"><a href="'.$link.'" style="text-decoration:none;float:right;font-size:16px;margin-top:5px;"><b>X</b></a><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>';
614
  $show_notice = false;
615
  }
616
 
cleantalk-comments-checkspam.js CHANGED
@@ -11,6 +11,23 @@ String.prototype.format = String.prototype.f = function ()
11
  });
12
  };
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  function ct_send_comments()
15
  {
16
  var data = {
@@ -126,7 +143,7 @@ function ct_delete_checked()
126
  jQuery("#ct_check_spam_button").click(function(){
127
  jQuery('#ct_working_message').show();
128
  working=true;
129
- ct_send_comments();
130
  });
131
  jQuery("#ct_check_spam_button").click(function(){
132
  jQuery('#ct_checking_status').html('');
11
  });
12
  };
13
 
14
+ function ct_clear_comments()
15
+ {
16
+ var data = {
17
+ 'action': 'ajax_clear_comments',
18
+ 'security': ajax_nonce
19
+ };
20
+
21
+ jQuery.ajax({
22
+ type: "POST",
23
+ url: ajaxurl,
24
+ data: data,
25
+ success: function(msg){
26
+ ct_send_comments();
27
+ }
28
+ });
29
+ }
30
+
31
  function ct_send_comments()
32
  {
33
  var data = {
143
  jQuery("#ct_check_spam_button").click(function(){
144
  jQuery('#ct_working_message').show();
145
  working=true;
146
+ ct_clear_comments();
147
  });
148
  jQuery("#ct_check_spam_button").click(function(){
149
  jQuery('#ct_checking_status').html('');
cleantalk-comments.php CHANGED
@@ -33,7 +33,7 @@ function ct_show_checkspam_page()
33
  'count'=>true
34
  );
35
  $cnt_unchecked=get_comments($args_unchecked);
36
- if($cnt_unchecked>0)
37
  {
38
  ?>
39
  <button class="button" id="ct_check_spam_button"><?php _e("Find spam comments", 'cleantalk'); ?></button><br />
@@ -49,7 +49,8 @@ function ct_show_checkspam_page()
49
  <?php _e("Please wait for a while. CleanTalk is checking all approved and pending comments via blacklist database at cleantalk.org. You will have option to delete found spam comments after plugin finish.", 'cleantalk'); ?>
50
  </div>
51
  <div id="ct_done_message" <?php if($cnt_unchecked>0) print 'style="display:none"'; ?>>
52
- <?php _e("Done. All comments tested via blacklists database, please see result bellow.", 'cleantalk'); ?>
 
53
  </div>
54
  <h3 id="ct_checking_status"></h3>
55
  <?php
@@ -416,5 +417,14 @@ function ct_ajax_delete_all()
416
  wp_delete_comment($c_spam[$i]->comment_ID, false);
417
  }
418
  die();
 
 
 
 
 
 
 
 
 
419
  }
420
  ?>
33
  'count'=>true
34
  );
35
  $cnt_unchecked=get_comments($args_unchecked);
36
+ //if($cnt_unchecked>0)
37
  {
38
  ?>
39
  <button class="button" id="ct_check_spam_button"><?php _e("Find spam comments", 'cleantalk'); ?></button><br />
49
  <?php _e("Please wait for a while. CleanTalk is checking all approved and pending comments via blacklist database at cleantalk.org. You will have option to delete found spam comments after plugin finish.", 'cleantalk'); ?>
50
  </div>
51
  <div id="ct_done_message" <?php if($cnt_unchecked>0) print 'style="display:none"'; ?>>
52
+ <?php //_e("Done. All comments tested via blacklists database, please see result bellow.", 'cleantalk');
53
+ ?>
54
  </div>
55
  <h3 id="ct_checking_status"></h3>
56
  <?php
417
  wp_delete_comment($c_spam[$i]->comment_ID, false);
418
  }
419
  die();
420
+ }
421
+
422
+ add_action( 'wp_ajax_ajax_clear_comments', 'ct_ajax_clear_comments' );
423
+ function ct_ajax_clear_comments()
424
+ {
425
+ check_ajax_referer( 'ct_secret_nonce', 'security' );
426
+ global $wpdb;
427
+ $wpdb->query("delete from $wpdb->commentmeta where meta_key='ct_hash' or meta_key='ct_checked' or meta_key='ct_marked_as_spam';");
428
+ die();
429
  }
430
  ?>
cleantalk-common.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- $ct_agent_version = 'wordpress-512';
4
  $ct_plugin_name = 'Anti-spam by CleanTalk';
5
  $ct_checkjs_frm = 'ct_checkjs_frm';
6
  $ct_checkjs_register_form = 'ct_checkjs_register_form';
@@ -258,6 +258,7 @@ function get_sender_info() {
258
  'spam_store_days' => $ct_options['spam_store_days'],
259
  'ssl_on' => $ct_options['ssl_on'],
260
  );
 
261
 
262
  return $sender_info = array(
263
  'page_url' => htmlspecialchars(@$_SERVER['SERVER_NAME'].@$_SERVER['REQUEST_URI']),
1
  <?php
2
 
3
+ $ct_agent_version = 'wordpress-513';
4
  $ct_plugin_name = 'Anti-spam by CleanTalk';
5
  $ct_checkjs_frm = 'ct_checkjs_frm';
6
  $ct_checkjs_register_form = 'ct_checkjs_register_form';
258
  'spam_store_days' => $ct_options['spam_store_days'],
259
  'ssl_on' => $ct_options['ssl_on'],
260
  );
261
+ $options2server=$ct_options;
262
 
263
  return $sender_info = array(
264
  'page_url' => htmlspecialchars(@$_SERVER['SERVER_NAME'].@$_SERVER['REQUEST_URI']),
cleantalk-public.php CHANGED
@@ -28,6 +28,16 @@ function ct_init() {
28
  $ct_general_postdata_test=0;
29
  }
30
 
 
 
 
 
 
 
 
 
 
 
31
  //add_action('wp_footer','ct_ajaxurl');
32
 
33
  // Fast Secure contact form
@@ -1445,7 +1455,9 @@ function ct_contact_form_validate () {
1445
 
1446
  if ($_SERVER['REQUEST_METHOD'] != 'POST' ||
1447
  (isset($_POST['log']) && isset($_POST['pwd']) && isset($pagenow) && $pagenow == 'wp-login.php') || // WordPress log in form
1448
- (isset($pagenow) && $pagenow == 'wp-login.php' && isset($_GET['action']) && $_GET['action']=='lostpassword')
 
 
1449
  ) {
1450
  return null;
1451
  }
@@ -1521,7 +1533,8 @@ function ct_contact_form_validate_postdata () {
1521
  (isset($_POST['log']) && isset($_POST['pwd']) && isset($pagenow) && $pagenow == 'wp-login.php') || // WordPress log in form
1522
  (isset($pagenow) && $pagenow == 'wp-login.php' && isset($_GET['action']) && $_GET['action']=='lostpassword')||
1523
  ct_check_array_keys($_POST) ||
1524
- (isset($pagenow) && $pagenow == 'wp-cron.php')
 
1525
  ) {
1526
  return null;
1527
  }
28
  $ct_general_postdata_test=0;
29
  }
30
 
31
+ if (isset($ct_options['general_contact_forms_test']) && $ct_options['general_contact_forms_test'] == 1)
32
+ {
33
+ add_action('CMA_custom_post_type_nav','ct_contact_form_validate_postdata',1);
34
+ }
35
+
36
+ if($ct_general_postdata_test==1)
37
+ {
38
+ add_action('CMA_custom_post_type_nav','ct_contact_form_validate_postdata',1);
39
+ }
40
+
41
  //add_action('wp_footer','ct_ajaxurl');
42
 
43
  // Fast Secure contact form
1455
 
1456
  if ($_SERVER['REQUEST_METHOD'] != 'POST' ||
1457
  (isset($_POST['log']) && isset($_POST['pwd']) && isset($pagenow) && $pagenow == 'wp-login.php') || // WordPress log in form
1458
+ (isset($pagenow) && $pagenow == 'wp-login.php' && isset($_GET['action']) && $_GET['action']=='lostpassword'||
1459
+ strpos($_SERVER['REQUEST_URI'],'/checkout/')!==false
1460
+ )
1461
  ) {
1462
  return null;
1463
  }
1533
  (isset($_POST['log']) && isset($_POST['pwd']) && isset($pagenow) && $pagenow == 'wp-login.php') || // WordPress log in form
1534
  (isset($pagenow) && $pagenow == 'wp-login.php' && isset($_GET['action']) && $_GET['action']=='lostpassword')||
1535
  ct_check_array_keys($_POST) ||
1536
+ (isset($pagenow) && $pagenow == 'wp-cron.php' ||
1537
+ strpos($_SERVER['REQUEST_URI'],'/checkout/')!==false)
1538
  ) {
1539
  return null;
1540
  }
cleantalk.class.php CHANGED
@@ -1112,5 +1112,3 @@ if( !function_exists('apache_request_headers') )
1112
  return( $arh );
1113
  }
1114
  }
1115
-
1116
- ?>
1112
  return( $arh );
1113
  }
1114
  }
 
 
cleantalk.php CHANGED
@@ -3,11 +3,11 @@
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.12
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
- $cleantalk_plugin_version='5.12';
11
  $cleantalk_executed=false;
12
 
13
  if(!defined('CLEANTALK_PLUGIN_DIR')){
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.13
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
+ $cleantalk_plugin_version='5.13';
11
  $cleantalk_executed=false;
12
 
13
  if(!defined('CLEANTALK_PLUGIN_DIR')){
i18n/cleantalk-ru_RU.mo CHANGED
Binary file
readme.txt CHANGED
@@ -1,9 +1,9 @@
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 spam, registration, plugin, antispam plugin, spam plugin, anti-spam plugin, ninja, cache spam
4
  Requires at least: 3.0
5
  Tested up to: 4.2.2
6
- Stable tag: 5.12
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -184,6 +184,10 @@ WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enab
184
  1. Setup Android/iOS app to have push notices when new legitiamte comments/registrations or contactcs appears on the website.
185
 
186
  == Changelog ==
 
 
 
 
187
  = 5.12 2015-06-01 =
188
  * Added option for checking all post data for spam
189
  * Some JavaScript protection improvements
@@ -582,6 +586,10 @@ WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enab
582
  * First version
583
 
584
  == Upgrade Notice ==
 
 
 
 
585
  = 5.12 2015-06-01 =
586
  * Added option for checking all post data for spam
587
  * Some JavaScript protection improvements
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 spam, registration, plugin, antispam plugin, anti-spam plugin, ninja, cache
4
  Requires at least: 3.0
5
  Tested up to: 4.2.2
6
+ Stable tag: 5.13
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
184
  1. Setup Android/iOS app to have push notices when new legitiamte comments/registrations or contactcs appears on the website.
185
 
186
  == Changelog ==
187
+ = 5.13 2015-06-12 =
188
+ * Closing notifocatiion for anti-spam renew
189
+ * Fixed bulk antispam comment checking
190
+
191
  = 5.12 2015-06-01 =
192
  * Added option for checking all post data for spam
193
  * Some JavaScript protection improvements
586
  * First version
587
 
588
  == Upgrade Notice ==
589
+ = 5.13 2015-06-12 =
590
+ * Closing notifocatiion for anti-spam renew
591
+ * Fixed bulk antispam comment checking
592
+
593
  = 5.12 2015-06-01 =
594
  * Added option for checking all post data for spam
595
  * Some JavaScript protection improvements