Version Description
2013-12-19 = * New: Added protection against spam bots for WooCommerce review form. * Fixed: JavaScript antispam logic for WooCommerce review form.
Download this release
Release Info
Developer | znaeff |
Plugin | Spam protection, AntiSpam, FireWall by CleanTalk |
Version | 2.28 |
Comparing to | |
See all releases |
Code changes from version 2.27 to 2.28
- cleantalk.class.php +31 -1
- cleantalk.php +4 -4
- readme.txt +7 -2
cleantalk.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Cleantalk base class
|
4 |
*
|
5 |
-
* @version 1.21.
|
6 |
* @package Cleantalk
|
7 |
* @subpackage Base
|
8 |
* @author Сleantalk team (welcome@cleantalk.ru)
|
@@ -134,6 +134,12 @@ class CleantalkResponse {
|
|
134 |
*/
|
135 |
public $inactive = null;
|
136 |
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
/**
|
138 |
* Create server response
|
139 |
*
|
@@ -165,6 +171,7 @@ class CleantalkResponse {
|
|
165 |
$this->sms_error_text = (isset($obj->sms_error_text)) ? $obj->sms_error_text : null;
|
166 |
$this->stop_queue = (isset($obj->stop_queue)) ? $obj->stop_queue : 0;
|
167 |
$this->inactive = (isset($obj->inactive)) ? $obj->inactive : 0;
|
|
|
168 |
|
169 |
if ($this->errno !== 0 && $this->errstr !== null && $this->comment === null)
|
170 |
$this->comment = '*** ' . $this->errstr . ' Automoderator cleantalk.org ***';
|
@@ -717,6 +724,15 @@ class Cleantalk {
|
|
717 |
}
|
718 |
|
719 |
$response = new CleantalkResponse(null, $result);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
720 |
|
721 |
return $response;
|
722 |
}
|
@@ -886,6 +902,20 @@ class Cleantalk {
|
|
886 |
|
887 |
return $str;
|
888 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
889 |
}
|
890 |
|
891 |
?>
|
2 |
/**
|
3 |
* Cleantalk base class
|
4 |
*
|
5 |
+
* @version 1.21.14
|
6 |
* @package Cleantalk
|
7 |
* @subpackage Base
|
8 |
* @author Сleantalk team (welcome@cleantalk.ru)
|
134 |
*/
|
135 |
public $inactive = null;
|
136 |
|
137 |
+
/**
|
138 |
+
* Account status
|
139 |
+
* @var int
|
140 |
+
*/
|
141 |
+
public $account_status = -1;
|
142 |
+
|
143 |
/**
|
144 |
* Create server response
|
145 |
*
|
171 |
$this->sms_error_text = (isset($obj->sms_error_text)) ? $obj->sms_error_text : null;
|
172 |
$this->stop_queue = (isset($obj->stop_queue)) ? $obj->stop_queue : 0;
|
173 |
$this->inactive = (isset($obj->inactive)) ? $obj->inactive : 0;
|
174 |
+
$this->account_status = (isset($obj->account_status)) ? $obj->account_status : -1;
|
175 |
|
176 |
if ($this->errno !== 0 && $this->errstr !== null && $this->comment === null)
|
177 |
$this->comment = '*** ' . $this->errstr . ' Automoderator cleantalk.org ***';
|
724 |
}
|
725 |
|
726 |
$response = new CleantalkResponse(null, $result);
|
727 |
+
|
728 |
+
if (!empty($this->data_codepage) && $this->data_codepage !== 'UTF-8') {
|
729 |
+
if (!empty($response->comment))
|
730 |
+
$response->comment = $this->stringFromUTF8($response->comment, $this->data_codepage);
|
731 |
+
if (!empty($response->errstr))
|
732 |
+
$response->errstr = $this->stringFromUTF8($response->errstr, $this->data_codepage);
|
733 |
+
if (!empty($response->sms_error_text))
|
734 |
+
$response->sms_error_text = $this->stringFromUTF8($response->sms_error_text, $this->data_codepage);
|
735 |
+
}
|
736 |
|
737 |
return $response;
|
738 |
}
|
902 |
|
903 |
return $str;
|
904 |
}
|
905 |
+
|
906 |
+
/**
|
907 |
+
* Function convert string from UTF8
|
908 |
+
* param string
|
909 |
+
* param string
|
910 |
+
* @return string
|
911 |
+
*/
|
912 |
+
function stringFromUTF8($str, $data_codepage = null){
|
913 |
+
if (preg_match('//u', $str) && function_exists('mb_convert_encoding') && $data_codepage !== null) {
|
914 |
+
return mb_convert_encoding($str, $data_codepage, 'UTF-8');
|
915 |
+
}
|
916 |
+
|
917 |
+
return $str;
|
918 |
+
}
|
919 |
}
|
920 |
|
921 |
?>
|
cleantalk.php
CHANGED
@@ -3,12 +3,12 @@
|
|
3 |
Plugin Name: Anti-spam by CleanTalk
|
4 |
Plugin URI: http://cleantalk.org/wordpress
|
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.
|
7 |
Author: СleanTalk <welcome@cleantalk.ru>
|
8 |
Author URI: http://cleantalk.org
|
9 |
*/
|
10 |
|
11 |
-
$ct_agent_version = 'wordpress-
|
12 |
$ct_checkjs_frm = 'ct_checkjs_frm';
|
13 |
$ct_checkjs_register_form = 'ct_checkjs_register_form';
|
14 |
$ct_session_request_id_label = 'request_id';
|
@@ -233,7 +233,7 @@ function ct_comment_form() {
|
|
233 |
function ct_add_hidden_fields($post_id = 0, $field_name = 'ct_checkjs', $return_string = false) {
|
234 |
$ct_checkjs_def = 0;
|
235 |
$ct_checkjs_key = ct_get_checkjs_value();
|
236 |
-
|
237 |
ct_init_session();
|
238 |
$_SESSION['formtime'] = time();
|
239 |
$html = '
|
@@ -244,7 +244,7 @@ function ct_add_hidden_fields($post_id = 0, $field_name = 'ct_checkjs', $return_
|
|
244 |
// ]]>
|
245 |
</script>
|
246 |
';
|
247 |
-
$html = sprintf($html, $
|
248 |
if ($return_string === true) {
|
249 |
return $html;
|
250 |
} else {
|
3 |
Plugin Name: Anti-spam by CleanTalk
|
4 |
Plugin URI: http://cleantalk.org/wordpress
|
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.28
|
7 |
Author: СleanTalk <welcome@cleantalk.ru>
|
8 |
Author URI: http://cleantalk.org
|
9 |
*/
|
10 |
|
11 |
+
$ct_agent_version = 'wordpress-228';
|
12 |
$ct_checkjs_frm = 'ct_checkjs_frm';
|
13 |
$ct_checkjs_register_form = 'ct_checkjs_register_form';
|
14 |
$ct_session_request_id_label = 'request_id';
|
233 |
function ct_add_hidden_fields($post_id = 0, $field_name = 'ct_checkjs', $return_string = false) {
|
234 |
$ct_checkjs_def = 0;
|
235 |
$ct_checkjs_key = ct_get_checkjs_value();
|
236 |
+
$field_id = $field_name . '_' . md5(rand(0, 1000));
|
237 |
ct_init_session();
|
238 |
$_SESSION['formtime'] = time();
|
239 |
$html = '
|
244 |
// ]]>
|
245 |
</script>
|
246 |
';
|
247 |
+
$html = sprintf($html, $field_id, $field_name, $field_id, $field_id, $ct_checkjs_def, $ct_checkjs_key);
|
248 |
if ($return_string === true) {
|
249 |
return $html;
|
250 |
} else {
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== Anti-spam by CleanTalk ===
|
2 |
Contributors: znaeff, shagimuratov
|
3 |
-
Tags: antispam, anti-spam, spam, captcha, comment, comments, wpmu, network, multisite, forms, registration, login, contact form, buddypress, bbpress, admin, user, users, post, posts, wordpress, javascript, plugin, blacklists, cloud, math, signup, akismet
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 3.8
|
6 |
-
Stable tag: 2.
|
7 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -19,6 +19,7 @@ Cloud antispam for comments, signups and contacts.
|
|
19 |
* Formiadble forms.
|
20 |
* Contact form 7.
|
21 |
* JetPack Contact form.
|
|
|
22 |
* no CAPTCHA, no questions, no counting animals, no puzzles, no math.
|
23 |
|
24 |
The plugin is WordPress MultiUser (WPMU or WordPress network) compatible. Each blog in multisite environment has individual anitspam options for spam bots protection.
|
@@ -85,6 +86,10 @@ Use other antispam plugins not necessarily, because CleanTalk stops 99.99% of sp
|
|
85 |
|
86 |
== Changelog ==
|
87 |
|
|
|
|
|
|
|
|
|
88 |
= 2.27 2013-12-06 =
|
89 |
* New: Added protection against spam bots for JetPack Contact form.
|
90 |
* Fixed: JavaScript antispam logic for registrations and Contact form 7.
|
1 |
=== Anti-spam by CleanTalk ===
|
2 |
Contributors: znaeff, shagimuratov
|
3 |
+
Tags: antispam, anti-spam, spam, captcha, comment, comments, wpmu, network, multisite, forms, registration, login, contact form, buddypress, bbpress, admin, user, users, post, posts, wordpress, javascript, plugin, blacklists, cloud, math, signup, akismet, JetPack, WooCommerce
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 3.8
|
6 |
+
Stable tag: 2.28
|
7 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
19 |
* Formiadble forms.
|
20 |
* Contact form 7.
|
21 |
* JetPack Contact form.
|
22 |
+
* WooCommerce review form.
|
23 |
* no CAPTCHA, no questions, no counting animals, no puzzles, no math.
|
24 |
|
25 |
The plugin is WordPress MultiUser (WPMU or WordPress network) compatible. Each blog in multisite environment has individual anitspam options for spam bots protection.
|
86 |
|
87 |
== Changelog ==
|
88 |
|
89 |
+
= 2.28 2013-12-19 =
|
90 |
+
* New: Added protection against spam bots for WooCommerce review form.
|
91 |
+
* Fixed: JavaScript antispam logic for WooCommerce review form.
|
92 |
+
|
93 |
= 2.27 2013-12-06 =
|
94 |
* New: Added protection against spam bots for JetPack Contact form.
|
95 |
* Fixed: JavaScript antispam logic for registrations and Contact form 7.
|