Spam protection, AntiSpam, FireWall by CleanTalk - Version 5.2

Version Description

2015-04-01 = * Added link for anti-spam statistics * Added WP User Frontend Pro registration form protection

Download this release

Release Info

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

Code changes from version 5.1 to 5.2

cleantalk-admin.php CHANGED
@@ -81,6 +81,12 @@ function ct_admin_init() {
81
  if (isset($result['data']) && is_array($result['data'])) {
82
  $result = $result['data'];
83
  }
 
 
 
 
 
 
84
  if (isset($result['auth_key']) && !empty($result['auth_key'])) {
85
  $_POST['cleantalk_settings']['apikey'] = $result['auth_key'];
86
  } else {
@@ -214,6 +220,7 @@ function ct_input_apikey() {
214
  if (isset($_COOKIE[$ct_notice_online_label]) && $_COOKIE[$ct_notice_online_label] > 0) {
215
  echo '&nbsp;&nbsp;<span style="text-decoration: underline;">The key accepted!</span>&nbsp;<img src="' . plugin_dir_url(__FILE__) . 'inc/images/yes.png" alt="" height="" />';
216
  }
 
217
  }
218
  }
219
 
81
  if (isset($result['data']) && is_array($result['data'])) {
82
  $result = $result['data'];
83
  }
84
+ if(isset($result['user_token']))
85
+ {
86
+
87
+ $ct_data['user_token'] = $result['user_token'];
88
+ update_option('cleantalk_data', $ct_data);
89
+ }
90
  if (isset($result['auth_key']) && !empty($result['auth_key'])) {
91
  $_POST['cleantalk_settings']['apikey'] = $result['auth_key'];
92
  } else {
220
  if (isset($_COOKIE[$ct_notice_online_label]) && $_COOKIE[$ct_notice_online_label] > 0) {
221
  echo '&nbsp;&nbsp;<span style="text-decoration: underline;">The key accepted!</span>&nbsp;<img src="' . plugin_dir_url(__FILE__) . 'inc/images/yes.png" alt="" height="" />';
222
  }
223
+ echo "<br /><br /><a target='__blank' href='https://cleantalk.org/my?user_token=".@$ct_data['user_token']."'>".__('Click here to get anti-spam statistics', 'cleantalk')."</a>";
224
  }
225
  }
226
 
cleantalk-ajax.php CHANGED
@@ -11,13 +11,18 @@ add_action( 'wp_ajax_validate_email', 'ct_validate_email_ajaxlogin',1 );
11
  /*hooks for user registration*/
12
  add_action( 'user_register', 'ct_user_register_ajaxlogin',1 );
13
 
 
 
 
 
14
 
15
  function ct_validate_email_ajaxlogin($email=null, $is_ajax=true)
16
  {
17
  require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-public.php');
18
- global $ct_agent_version, $ct_checkjs_register_form, $ct_session_request_id_label, $ct_session_register_ok_label, $bp, $ct_signup_done, $ct_formtime_label, $ct_negative_comment, $ct_options;
19
 
20
  $ct_options=ct_get_options();
 
21
 
22
  $email = is_null( $email ) ? $email : $_POST['email'];
23
  $email=sanitize_email($email);
@@ -109,9 +114,10 @@ function ct_validate_email_ajaxlogin($email=null, $is_ajax=true)
109
  function ct_user_register_ajaxlogin($user_id)
110
  {
111
  require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-public.php');
112
- global $ct_agent_version, $ct_checkjs_register_form, $ct_session_request_id_label, $ct_session_register_ok_label, $bp, $ct_signup_done, $ct_formtime_label, $ct_negative_comment, $ct_options;
113
 
114
  $ct_options=ct_get_options();
 
115
 
116
  if(class_exists('AjaxLogin')&&isset($_POST['action'])&&$_POST['action']=='register_submit')
117
  {
@@ -172,4 +178,62 @@ function ct_user_register_ajaxlogin($user_id)
172
  return $user_id;
173
  }
174
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  ?>
11
  /*hooks for user registration*/
12
  add_action( 'user_register', 'ct_user_register_ajaxlogin',1 );
13
 
14
+ /*hooks for WPUF pro */
15
+ add_action( 'wp_ajax_nopriv_wpuf_submit_register', 'ct_wpuf_submit_register',1 );
16
+ add_action( 'wp_ajax_wpuf_submit_register', 'ct_wpuf_submit_register',1 );
17
+
18
 
19
  function ct_validate_email_ajaxlogin($email=null, $is_ajax=true)
20
  {
21
  require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-public.php');
22
+ global $ct_agent_version, $ct_checkjs_register_form, $ct_session_request_id_label, $ct_session_register_ok_label, $bp, $ct_signup_done, $ct_formtime_label, $ct_negative_comment, $ct_options, $ct_data;
23
 
24
  $ct_options=ct_get_options();
25
+ $ct_data=ct_get_data();
26
 
27
  $email = is_null( $email ) ? $email : $_POST['email'];
28
  $email=sanitize_email($email);
114
  function ct_user_register_ajaxlogin($user_id)
115
  {
116
  require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-public.php');
117
+ global $ct_agent_version, $ct_checkjs_register_form, $ct_session_request_id_label, $ct_session_register_ok_label, $bp, $ct_signup_done, $ct_formtime_label, $ct_negative_comment, $ct_options, $ct_data;
118
 
119
  $ct_options=ct_get_options();
120
+ $ct_data=ct_get_data();
121
 
122
  if(class_exists('AjaxLogin')&&isset($_POST['action'])&&$_POST['action']=='register_submit')
123
  {
178
  return $user_id;
179
  }
180
 
181
+ function ct_wpuf_submit_register()
182
+ {
183
+ require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-public.php');
184
+ global $ct_agent_version, $ct_checkjs_register_form, $ct_session_request_id_label, $ct_session_register_ok_label, $bp, $ct_signup_done, $ct_formtime_label, $ct_negative_comment, $ct_options, $ct_data;
185
+
186
+ $ct_data=ct_get_data();
187
+
188
+ $ct_options=ct_get_options();
189
+
190
+ $sender_email = null;
191
+ $message = '';
192
+
193
+ foreach ($_POST as $key => $value)
194
+ {
195
+ if ($sender_email === null && preg_match("/^\S+@\S+\.\S+$/", $value))
196
+ {
197
+ $sender_email = $value;
198
+ }
199
+ else
200
+ {
201
+ $message.="$value\n";
202
+ }
203
+ }
204
+
205
+ if($sender_email!=null)
206
+ {
207
+ $checkjs = js_test('ct_checkjs', $_COOKIE, true);
208
+ $submit_time = submit_time_test();
209
+ $sender_info = get_sender_info();
210
+ $sender_info['post_checkjs_passed']=$checkjs;
211
+
212
+ $sender_info = json_encode($sender_info);
213
+ if ($sender_info === false)
214
+ {
215
+ $sender_info= '';
216
+ }
217
+
218
+ $ct_base_call_result = ct_base_call(array(
219
+ 'message' => $message,
220
+ 'example' => null,
221
+ 'sender_email' => $sender_email,
222
+ 'sender_nickname' => null,
223
+ 'sender_info' => $sender_info,
224
+ 'post_info'=>null,
225
+ 'checkjs' => $checkjs));
226
+
227
+ $ct = $ct_base_call_result['ct'];
228
+ $ct_result = $ct_base_call_result['ct_result'];
229
+ if ($ct_result->allow == 0)
230
+ {
231
+ $result=Array('success'=>false,'error'=>$ct_result->comment);
232
+ @header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
233
+ print json_encode($result);
234
+ die();
235
+ }
236
+ }
237
+ }
238
+
239
  ?>
cleantalk-common.php CHANGED
@@ -355,6 +355,7 @@ function ct_def_options() {
355
  'ssl_on' => 0, // Secure connection to servers
356
  'relevance_test' => 0, // Test comment for relevance
357
  'notice_api_errors' => 0, // Send API error notices to WP admin
 
358
  );
359
  }
360
 
355
  'ssl_on' => 0, // Secure connection to servers
356
  'relevance_test' => 0, // Test comment for relevance
357
  'notice_api_errors' => 0, // Send API error notices to WP admin
358
+ 'user_token'=>'' //user token for auto login into spam statistics
359
  );
360
  }
361
 
cleantalk.php CHANGED
@@ -3,7 +3,7 @@
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.1
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
@@ -17,10 +17,12 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
17
  // http://codex.wordpress.org/Function_Reference/register_activation_hook
18
  register_activation_hook( __FILE__, 'ct_activation' );
19
  register_deactivation_hook( __FILE__, 'ct_deactivation' );
 
20
 
21
 
22
  // After plugin loaded - to load locale as described in manual
23
  add_action( 'plugins_loaded', 'ct_plugin_loaded' );
 
24
 
25
  if (is_admin())
26
  {
@@ -82,6 +84,7 @@ if(!defined('CLEANTALK_PLUGIN_DIR')){
82
  if (!function_exists ( 'ct_activation')) {
83
  function ct_activation() {
84
  wp_schedule_event(time(), 'hourly', 'ct_hourly_event_hook' );
 
85
  }
86
  }
87
  /**
@@ -93,6 +96,22 @@ if (!function_exists ( 'ct_deactivation')) {
93
  }
94
  }
95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-comments.php');
97
 
98
  ?>
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.2
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
17
  // http://codex.wordpress.org/Function_Reference/register_activation_hook
18
  register_activation_hook( __FILE__, 'ct_activation' );
19
  register_deactivation_hook( __FILE__, 'ct_deactivation' );
20
+ add_action('admin_init', 'ct_plugin_redirect');
21
 
22
 
23
  // After plugin loaded - to load locale as described in manual
24
  add_action( 'plugins_loaded', 'ct_plugin_loaded' );
25
+
26
 
27
  if (is_admin())
28
  {
84
  if (!function_exists ( 'ct_activation')) {
85
  function ct_activation() {
86
  wp_schedule_event(time(), 'hourly', 'ct_hourly_event_hook' );
87
+ add_option('ct_plugin_do_activation_redirect', true);
88
  }
89
  }
90
  /**
96
  }
97
  }
98
 
99
+ /**
100
+ * Uses for redirection after activation
101
+ */
102
+ function ct_plugin_redirect()
103
+ {
104
+ if (get_option('ct_plugin_do_activation_redirect', false))
105
+ {
106
+ delete_option('ct_plugin_do_activation_redirect');
107
+ if(!isset($_GET['activate-multi']))
108
+ {
109
+ wp_redirect("options-general.php?page=cleantalk");
110
+ }
111
+ }
112
+ }
113
+
114
+
115
  require_once(CLEANTALK_PLUGIN_DIR . 'cleantalk-comments.php');
116
 
117
  ?>
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, fast secure contact form spam, form, Formidable spam, jetpack spam, landing pages, 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
4
  Requires at least: 3.0
5
  Tested up to: 4.1.1
6
- Stable tag: 5.1
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -35,7 +35,7 @@ No CAPTCHA, no questions, no counting animals, no puzzles, no math and no spam b
35
  With the help of anti-spam CleanTalk you can check existing comments, to find and quickly delete spam comments. For use these function, go to WP Console->Comments->Find spam comments.
36
 
37
  = Cloud anti-spam for WordPress. CAPTCHA less, no spam comments, no spam registrations, no spam contact emails, no spam trackbacks =
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.
@@ -46,7 +46,7 @@ We have developed antispam for WordPress that would provide **maximum protection
46
 
47
  The anti-spam method offered by CleanTalk allows to switch from the methods that trouble the communication (CAPTCHA, question-answer etc.) to a more convenient one.
48
 
49
- The CleanTalk is premium anti-spam for WordPress, please look at the <a href="http://cleantalk.org/price">pricing</a>. We try to provide anti-spam service at the highest level and we can not afford to offer a free version of our service, as this will immediately affect the quality of providing anti-spam protection. Paying for a year of anti-spam service, you save a lot more and get:
50
 
51
  * Up to 100% protection against spam bots.
52
  * Time and resources saving.
@@ -60,7 +60,7 @@ The CleanTalk is premium anti-spam for WordPress, please look at the <a href="ht
60
  * Free mobile app to control anti-spam function at your website.
61
 
62
  = How to protect sites from spam bots without CAPTCHA? =
63
- The most popular method is CAPTCHA -- the annoying picture with curved and sloping symbols, which are offered to the visitor to fill in. It is supposed that spam bots won't discern these CAPTCHA, but a visitor will. CAPTCHA provokes great irritation, but if one wants to speak out, he has to fill in these symbols time after time, making mistakes and starting once again.
64
  Sometimes CAPTCHA reminds doodle 2x year old child. For users with vision problems captcha is just an insurmountable obstacle. Users hate captcha. Captcha for users means "hate". Unreadable CAPTCHA stops about 80% of site visitors. After 2 failed attempts to bring it up to 95% reject further attempts.
65
  At the sight of CAPTCHA and after input errors, many visitors leave the resource. Thus, CAPTCHA helps to protect the resource both from bots and visitors. CAPTCHA is not a panacea from spam. Doubts Concerning the Need for CAPTCHA?
66
 
@@ -181,6 +181,10 @@ 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.1 2015-03-24 =
185
  * Fixed site crash after installing 5.0 on some websites
186
 
@@ -536,6 +540,10 @@ WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enab
536
  * First version
537
 
538
  == Upgrade Notice ==
 
 
 
 
539
  = 5.10 2015-03-24 =
540
  * Fixed site crash after installing 5.0 on some websites
541
 
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, fast secure contact form spam, form, Formidable spam, jetpack spam, landing pages, 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
4
  Requires at least: 3.0
5
  Tested up to: 4.1.1
6
+ Stable tag: 5.2
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
35
  With the help of anti-spam CleanTalk you can check existing comments, to find and quickly delete spam comments. For use these function, go to WP Console->Comments->Find spam comments.
36
 
37
  = Cloud anti-spam for WordPress. CAPTCHA less, no spam comments, no spam registrations, no spam contact emails, no spam trackbacks =
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.
46
 
47
  The anti-spam method offered by CleanTalk allows to switch from the methods that trouble the communication (CAPTCHA, question-answer etc.) to a more convenient one.
48
 
49
+ The CleanTalk is premium anti-spam for WordPress, please look at the <a href="http://cleantalk.org/price">pricing</a>. The plugin works with cloud anti spam service CleanTalk. <b>CleanTalk has free trial for 14 days.</b> We try to provide anti-spam service at the highest level and we can not afford to offer a free version of our service, as this will immediately affect the quality of providing anti-spam protection. Paying for a year of anti-spam service, you save a lot more and get:
50
 
51
  * Up to 100% protection against spam bots.
52
  * Time and resources saving.
60
  * Free mobile app to control anti-spam function at your website.
61
 
62
  = How to protect sites from spam bots without CAPTCHA? =
63
+ The most popular method is CAPTCHA - the annoying picture with curved and sloping symbols, which are offered to the visitor to fill in. It is supposed that spam bots won't discern these CAPTCHA, but a visitor will. CAPTCHA provokes great irritation, but if one wants to speak out, he has to fill in these symbols time after time, making mistakes and starting once again.
64
  Sometimes CAPTCHA reminds doodle 2x year old child. For users with vision problems captcha is just an insurmountable obstacle. Users hate captcha. Captcha for users means "hate". Unreadable CAPTCHA stops about 80% of site visitors. After 2 failed attempts to bring it up to 95% reject further attempts.
65
  At the sight of CAPTCHA and after input errors, many visitors leave the resource. Thus, CAPTCHA helps to protect the resource both from bots and visitors. CAPTCHA is not a panacea from spam. Doubts Concerning the Need for CAPTCHA?
66
 
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.2 2015-04-01 =
185
+ * Added link for anti-spam statistics
186
+ * Added WP User Frontend Pro registration form protection
187
+
188
  = 5.1 2015-03-24 =
189
  * Fixed site crash after installing 5.0 on some websites
190
 
540
  * First version
541
 
542
  == Upgrade Notice ==
543
+ = 5.2 2015-04-01 =
544
+ * Added link for anti-spam statistics
545
+ * Added WP User Frontend Pro registration form protection
546
+
547
  = 5.10 2015-03-24 =
548
  * Fixed site crash after installing 5.0 on some websites
549