Version Description
2015-01-19 = * Removed deprecated option from comment approvement code. * New API key URL. * Trimmed API key in admin panel. * Added current options to array sended to CleanTalk servers.
Download this release
Release Info
Developer | shagimuratov |
Plugin | Spam protection, AntiSpam, FireWall by CleanTalk |
Version | 4.14 |
Comparing to | |
See all releases |
Code changes from version 4.13 to 4.14
- cleantalk-admin.php +2 -2
- cleantalk.php +34 -6
- readme.txt +12 -2
cleantalk-admin.php
CHANGED
@@ -141,7 +141,7 @@ function ct_input_apikey() {
|
|
141 |
$def_value = '';
|
142 |
echo "<input id='cleantalk_apikey' name='cleantalk_settings[apikey]' size='20' type='text' value='$value' style=\"font-size: 14pt;\"/>";
|
143 |
if (ct_valid_key($value) === false) {
|
144 |
-
echo "<a target='__blank' style='margin-left: 10px' href='
|
145 |
} else{
|
146 |
if (isset($_COOKIE[$ct_notice_online_label]) && $_COOKIE[$ct_notice_online_label] > 0) {
|
147 |
echo ' <span style="text-decoration: underline;">The key accepted!</span> <img src="' . plugin_dir_url(__FILE__) . 'inc/images/yes.png" alt="" height="" />';
|
@@ -467,7 +467,7 @@ function ct_update_option($option_name) {
|
|
467 |
if (function_exists('curl_init') && function_exists('json_decode')) {
|
468 |
$api_key = $ct_options['apikey'];
|
469 |
if (isset($_POST['cleantalk_settings']['apikey'])) {
|
470 |
-
$api_key = $_POST['cleantalk_settings']['apikey'];
|
471 |
}
|
472 |
|
473 |
if (!ct_valid_key($api_key)) {
|
141 |
$def_value = '';
|
142 |
echo "<input id='cleantalk_apikey' name='cleantalk_settings[apikey]' size='20' type='text' value='$value' style=\"font-size: 14pt;\"/>";
|
143 |
if (ct_valid_key($value) === false) {
|
144 |
+
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', 'cleantalk')."</a>";
|
145 |
} else{
|
146 |
if (isset($_COOKIE[$ct_notice_online_label]) && $_COOKIE[$ct_notice_online_label] > 0) {
|
147 |
echo ' <span style="text-decoration: underline;">The key accepted!</span> <img src="' . plugin_dir_url(__FILE__) . 'inc/images/yes.png" alt="" height="" />';
|
467 |
if (function_exists('curl_init') && function_exists('json_decode')) {
|
468 |
$api_key = $ct_options['apikey'];
|
469 |
if (isset($_POST['cleantalk_settings']['apikey'])) {
|
470 |
+
$api_key = trim($_POST['cleantalk_settings']['apikey']);
|
471 |
}
|
472 |
|
473 |
if (!ct_valid_key($api_key)) {
|
cleantalk.php
CHANGED
@@ -3,14 +3,14 @@
|
|
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: 4.
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: http://cleantalk.org
|
9 |
*/
|
10 |
|
11 |
define('CLEANTALK_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
12 |
|
13 |
-
$ct_agent_version = 'wordpress-
|
14 |
$ct_plugin_name = 'Anti-spam by CleanTalk';
|
15 |
$ct_checkjs_frm = 'ct_checkjs_frm';
|
16 |
$ct_checkjs_register_form = 'ct_checkjs_register_form';
|
@@ -275,8 +275,12 @@ function ct_plugin_loaded() {
|
|
275 |
*/
|
276 |
function ct_get_options() {
|
277 |
$options = get_option('cleantalk_settings');
|
278 |
-
if (!is_array($options))
|
279 |
$options = array();
|
|
|
|
|
|
|
|
|
280 |
return array_merge(ct_def_options(), (array) $options);
|
281 |
}
|
282 |
|
@@ -856,7 +860,7 @@ function ct_preprocess_comment($comment) {
|
|
856 |
// Change comment flow only for new authors
|
857 |
if ((int) $approved_comments == 0 || $ct_result->stop_words !== null) {
|
858 |
|
859 |
-
if ($ct_result->allow == 1 &&
|
860 |
add_filter('pre_comment_approved', 'ct_set_approved');
|
861 |
setcookie($ct_approved_request_id_label, $ct_result->id, 0, '/');
|
862 |
}
|
@@ -1768,9 +1772,10 @@ function ct_s2member_registration_test() {
|
|
1768 |
* General test for any contact form
|
1769 |
*/
|
1770 |
function ct_contact_form_validate () {
|
|
|
1771 |
|
1772 |
if ($_SERVER['REQUEST_METHOD'] != 'POST' ||
|
1773 |
-
(isset($_POST['log']) && isset($_POST['pwd'])) // WordPress log in form
|
1774 |
) {
|
1775 |
return null;
|
1776 |
}
|
@@ -1887,13 +1892,36 @@ function get_sender_info() {
|
|
1887 |
|
1888 |
$php_session = session_id() != '' ? 1 : 0;
|
1889 |
|
1890 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1891 |
'cms_lang' => substr(get_locale(), 0, 2),
|
1892 |
'REFFERRER' => @$_SERVER['HTTP_REFERER'],
|
1893 |
'USER_AGENT' => @$_SERVER['HTTP_USER_AGENT'],
|
1894 |
'php_session' => $php_session,
|
1895 |
'cookies_enabled' => ct_cookies_test(true),
|
1896 |
'direct_post' => $ct_direct_post,
|
|
|
|
|
|
|
1897 |
);
|
1898 |
}
|
1899 |
|
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: 4.14
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: http://cleantalk.org
|
9 |
*/
|
10 |
|
11 |
define('CLEANTALK_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
12 |
|
13 |
+
$ct_agent_version = 'wordpress-414';
|
14 |
$ct_plugin_name = 'Anti-spam by CleanTalk';
|
15 |
$ct_checkjs_frm = 'ct_checkjs_frm';
|
16 |
$ct_checkjs_register_form = 'ct_checkjs_register_form';
|
275 |
*/
|
276 |
function ct_get_options() {
|
277 |
$options = get_option('cleantalk_settings');
|
278 |
+
if (!is_array($options)){
|
279 |
$options = array();
|
280 |
+
}else{
|
281 |
+
if(array_key_exists('apikey', $options))
|
282 |
+
$options['apikey'] = trim($options['apikey']);
|
283 |
+
}
|
284 |
return array_merge(ct_def_options(), (array) $options);
|
285 |
}
|
286 |
|
860 |
// Change comment flow only for new authors
|
861 |
if ((int) $approved_comments == 0 || $ct_result->stop_words !== null) {
|
862 |
|
863 |
+
if ($ct_result->allow == 1 && get_option('comment_moderation') !== '1') {
|
864 |
add_filter('pre_comment_approved', 'ct_set_approved');
|
865 |
setcookie($ct_approved_request_id_label, $ct_result->id, 0, '/');
|
866 |
}
|
1772 |
* General test for any contact form
|
1773 |
*/
|
1774 |
function ct_contact_form_validate () {
|
1775 |
+
global $pagenow;
|
1776 |
|
1777 |
if ($_SERVER['REQUEST_METHOD'] != 'POST' ||
|
1778 |
+
(isset($_POST['log']) && isset($_POST['pwd']) && isset($pagenow) && $pagenow == 'wp-login.php') // WordPress log in form
|
1779 |
) {
|
1780 |
return null;
|
1781 |
}
|
1892 |
|
1893 |
$php_session = session_id() != '' ? 1 : 0;
|
1894 |
|
1895 |
+
// Raw data to validated JavaScript test in the cloud
|
1896 |
+
$checkjs_data_cookies = null;
|
1897 |
+
if (isset($_COOKIE['ct_checkjs'])) {
|
1898 |
+
$checkjs_data_cookies = $_COOKIE['ct_checkjs'];
|
1899 |
+
}
|
1900 |
+
|
1901 |
+
$checkjs_data_post = null;
|
1902 |
+
if (count($_POST) > 0) {
|
1903 |
+
foreach ($_POST as $k => $v) {
|
1904 |
+
if (preg_match("/^ct_check.+/", $k)) {
|
1905 |
+
$checkjs_data_post = $v;
|
1906 |
+
}
|
1907 |
+
}
|
1908 |
+
}
|
1909 |
+
|
1910 |
+
$options = ct_get_options();
|
1911 |
+
unset($options['js_keys']);
|
1912 |
+
unset($options['js_keys_store_days']);
|
1913 |
+
unset($options['js_key_lifetime']);
|
1914 |
+
|
1915 |
+
return $sender_info = array(
|
1916 |
'cms_lang' => substr(get_locale(), 0, 2),
|
1917 |
'REFFERRER' => @$_SERVER['HTTP_REFERER'],
|
1918 |
'USER_AGENT' => @$_SERVER['HTTP_USER_AGENT'],
|
1919 |
'php_session' => $php_session,
|
1920 |
'cookies_enabled' => ct_cookies_test(true),
|
1921 |
'direct_post' => $ct_direct_post,
|
1922 |
+
'checkjs_data_post' => $checkjs_data_post,
|
1923 |
+
'checkjs_data_cookies' => $checkjs_data_cookies,
|
1924 |
+
'ct_options' => json_encode($options),
|
1925 |
);
|
1926 |
}
|
1927 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: znaeff, shagimuratov
|
|
3 |
Tags: Akismet, anti spam, antispam, bbpress spam, buddypress spam, capcha, 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, signup spam, spam, spammers, spammy, WooCommerce spam, wordpress spam, booking spam, order spam
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 4.1
|
6 |
-
Stable tag: 4.
|
7 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -149,6 +149,7 @@ WordPress 3.0 at least. PHP 4, 5 with CURL or file_get_contents() function and e
|
|
149 |
= Translations =
|
150 |
* Spain (es_ES) - thanks to Andrew Kurtis and <a href="http://www.webhostinghub.com/index-c.html">WebHostingHub</a>
|
151 |
* Danish (da_DK)
|
|
|
152 |
* Russian (ru_RU)
|
153 |
|
154 |
== Screenshots ==
|
@@ -159,8 +160,14 @@ WordPress 3.0 at least. PHP 4, 5 with CURL or file_get_contents() function and e
|
|
159 |
1. Setup Android/iOS app to have push notices when new legitiamte comments/registrations or contactcs appears on the website.
|
160 |
|
161 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
= 4.13 2014-12-29 =
|
163 |
-
* Fixed bug with autimatically aprovement not spam comments. Now this option disabled and do not override local WordPress policy.
|
164 |
|
165 |
= 4.12 2014-12-29 =
|
166 |
* Fixed bug with 'Wrong Access key...' notice in WordPress dashboard.
|
@@ -463,6 +470,9 @@ WordPress 3.0 at least. PHP 4, 5 with CURL or file_get_contents() function and e
|
|
463 |
* First version
|
464 |
|
465 |
== Upgrade Notice ==
|
|
|
|
|
|
|
466 |
= 4.13 2014-12-29 =
|
467 |
Not spam comments auto approvement bug fix.
|
468 |
|
3 |
Tags: Akismet, anti spam, antispam, bbpress spam, buddypress spam, capcha, 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, signup spam, spam, spammers, spammy, WooCommerce spam, wordpress spam, booking spam, order spam
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 4.1
|
6 |
+
Stable tag: 4.14
|
7 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
149 |
= Translations =
|
150 |
* Spain (es_ES) - thanks to Andrew Kurtis and <a href="http://www.webhostinghub.com/index-c.html">WebHostingHub</a>
|
151 |
* Danish (da_DK)
|
152 |
+
* French (fr_FR)
|
153 |
* Russian (ru_RU)
|
154 |
|
155 |
== Screenshots ==
|
160 |
1. Setup Android/iOS app to have push notices when new legitiamte comments/registrations or contactcs appears on the website.
|
161 |
|
162 |
== Changelog ==
|
163 |
+
= 4.14 2015-01-19 =
|
164 |
+
* Removed deprecated option from comment approvement code.
|
165 |
+
* New API key URL.
|
166 |
+
* Trimmed API key in admin panel.
|
167 |
+
* Added current options to array sended to CleanTalk servers.
|
168 |
+
|
169 |
= 4.13 2014-12-29 =
|
170 |
+
* Fixed bug with autimatically aprovement not spam comments. Now this option disabled and do not override local WordPress policy.
|
171 |
|
172 |
= 4.12 2014-12-29 =
|
173 |
* Fixed bug with 'Wrong Access key...' notice in WordPress dashboard.
|
470 |
* First version
|
471 |
|
472 |
== Upgrade Notice ==
|
473 |
+
= 4.14 2015-01-19 =
|
474 |
+
Removed deprecated option from comment approvement code.
|
475 |
+
|
476 |
= 4.13 2014-12-29 =
|
477 |
Not spam comments auto approvement bug fix.
|
478 |
|