Version Description
2014-07-21 = * Fixed account status check logic. Previous version makes unnecessary test API calls when the plugin asks account status check.
Download this release
Release Info
Developer | shagimuratov |
Plugin | Spam protection, AntiSpam, FireWall by CleanTalk |
Version | 2.56 |
Comparing to | |
See all releases |
Code changes from version 2.55 to 2.56
- cleantalk-admin.php +11 -4
- cleantalk.php +5 -2
- readme.txt +8 -2
cleantalk-admin.php
CHANGED
@@ -22,7 +22,7 @@ function ct_admin_add_page() {
|
|
22 |
* Admin action 'admin_init' - Add the admin settings and such
|
23 |
*/
|
24 |
function ct_admin_init() {
|
25 |
-
global $show_ct_notice_trial, $ct_notice_trial_label, $show_ct_notice_online, $ct_notice_online_label, $trial_notice_showtime, $pagenow, $ct_plugin_name, $ct_options, $trial_notice_check_timeout, $account_notice_check_timeout, $ct_user_token_label;
|
26 |
|
27 |
$ct_options = ct_get_options();
|
28 |
|
@@ -75,9 +75,10 @@ function ct_admin_init() {
|
|
75 |
$ct_options['user_token'] = $result['user_token'];
|
76 |
}
|
77 |
}
|
78 |
-
|
79 |
// Save next status request time
|
80 |
$ct_options['next_account_status_check'] = strtotime("+$notice_check_timeout hours", time());
|
|
|
81 |
update_option('cleantalk_settings', $ct_options);
|
82 |
}
|
83 |
|
@@ -439,10 +440,16 @@ if (!function_exists ( 'ct_plugin_action_links')) {
|
|
439 |
* @return array
|
440 |
*/
|
441 |
function ct_update_option($option_name) {
|
442 |
-
global $show_ct_notice_online, $ct_notice_online_label, $ct_notice_trial_label, $trial_notice_showtime;
|
|
|
|
|
|
|
|
|
443 |
|
444 |
-
if
|
|
|
445 |
return;
|
|
|
446 |
|
447 |
$ct_base_call_result = ct_base_call(array(
|
448 |
'message' => 'CleanTalk setup comment',
|
22 |
* Admin action 'admin_init' - Add the admin settings and such
|
23 |
*/
|
24 |
function ct_admin_init() {
|
25 |
+
global $show_ct_notice_trial, $ct_notice_trial_label, $show_ct_notice_online, $ct_notice_online_label, $trial_notice_showtime, $pagenow, $ct_plugin_name, $ct_options, $trial_notice_check_timeout, $account_notice_check_timeout, $ct_user_token_label, $ct_account_status_check;
|
26 |
|
27 |
$ct_options = ct_get_options();
|
28 |
|
75 |
$ct_options['user_token'] = $result['user_token'];
|
76 |
}
|
77 |
}
|
78 |
+
|
79 |
// Save next status request time
|
80 |
$ct_options['next_account_status_check'] = strtotime("+$notice_check_timeout hours", time());
|
81 |
+
$ct_account_status_check = time();
|
82 |
update_option('cleantalk_settings', $ct_options);
|
83 |
}
|
84 |
|
440 |
* @return array
|
441 |
*/
|
442 |
function ct_update_option($option_name) {
|
443 |
+
global $show_ct_notice_online, $ct_notice_online_label, $ct_notice_trial_label, $trial_notice_showtime, $ct_account_status_check;
|
444 |
+
|
445 |
+
if($option_name !== 'cleantalk_settings') {
|
446 |
+
return;
|
447 |
+
}
|
448 |
|
449 |
+
// Skip test call if the function executet during account status check
|
450 |
+
if ($ct_account_status_check > 0 && time() - $ct_account_status_check < 5) {
|
451 |
return;
|
452 |
+
}
|
453 |
|
454 |
$ct_base_call_result = ct_base_call(array(
|
455 |
'message' => 'CleanTalk setup comment',
|
cleantalk.php
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
Plugin Name: Anti-spam by CleanTalk
|
4 |
Plugin URI: http://cleantalk.org
|
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 |
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';
|
@@ -78,6 +78,9 @@ $ct_formtime_label = 'formtime';
|
|
78 |
// Plugin's options
|
79 |
$ct_options = null;
|
80 |
|
|
|
|
|
|
|
81 |
// Init action.
|
82 |
add_action('init', 'ct_init', 1);
|
83 |
|
3 |
Plugin Name: Anti-spam by CleanTalk
|
4 |
Plugin URI: http://cleantalk.org
|
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.56
|
7 |
Author: СleanTalk <welcome@cleantalk.ru>
|
8 |
Author URI: http://cleantalk.org
|
9 |
*/
|
10 |
|
11 |
define('CLEANTALK_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
12 |
|
13 |
+
$ct_agent_version = 'wordpress-256';
|
14 |
$ct_plugin_name = 'Anti-spam by CleanTalk';
|
15 |
$ct_checkjs_frm = 'ct_checkjs_frm';
|
16 |
$ct_checkjs_register_form = 'ct_checkjs_register_form';
|
78 |
// Plugin's options
|
79 |
$ct_options = null;
|
80 |
|
81 |
+
// Account status check last time
|
82 |
+
$ct_account_status_check = 0;
|
83 |
+
|
84 |
// Init action.
|
85 |
add_action('init', 'ct_init', 1);
|
86 |
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: znaeff, shagimuratov
|
3 |
Tags: antispam, anti-spam, anti spam, spam, spammers, captcha, comments, registration, contact form, blacklist, math, signup, formidable, bot, spam bots, spammy, s2member, wordpress, support, BuddyPress, bbpress, landing pages, fast secure contact form, WooCommerce, jetpack
|
4 |
Requires at least: 3.0
|
5 |
-
Tested up to:
|
6 |
-
Stable tag: 2.
|
7 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -143,6 +143,9 @@ WordPress 3.0 at least. PHP 4, 5 with CURL or file_get_contents() function and e
|
|
143 |
1. Anti spam stopped spam bot at the registration form.
|
144 |
|
145 |
== Changelog ==
|
|
|
|
|
|
|
146 |
= 2.55 2014-07-11 =
|
147 |
* Fixed bug with account status function. In backend the plugin showed notice 'Please don’t forget to disable CAPTCHA if you have it!' on every page.
|
148 |
|
@@ -353,6 +356,9 @@ WordPress 3.0 at least. PHP 4, 5 with CURL or file_get_contents() function and e
|
|
353 |
* First version
|
354 |
|
355 |
== Upgrade Notice ==
|
|
|
|
|
|
|
356 |
= 2.55 2014-07-11 =
|
357 |
* Fixed bug with account status function. In backend the plugin showed notice 'Please don’t forget to disable CAPTCHA if you have it!' on every page.
|
358 |
|
2 |
Contributors: znaeff, shagimuratov
|
3 |
Tags: antispam, anti-spam, anti spam, spam, spammers, captcha, comments, registration, contact form, blacklist, math, signup, formidable, bot, spam bots, spammy, s2member, wordpress, support, BuddyPress, bbpress, landing pages, fast secure contact form, WooCommerce, jetpack
|
4 |
Requires at least: 3.0
|
5 |
+
Tested up to: 4.0
|
6 |
+
Stable tag: 2.56
|
7 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
143 |
1. Anti spam stopped spam bot at the registration form.
|
144 |
|
145 |
== Changelog ==
|
146 |
+
= 2.56 2014-07-21 =
|
147 |
+
* Fixed account status check logic. Previous version makes unnecessary test API calls when the plugin asks account status check.
|
148 |
+
|
149 |
= 2.55 2014-07-11 =
|
150 |
* Fixed bug with account status function. In backend the plugin showed notice 'Please don’t forget to disable CAPTCHA if you have it!' on every page.
|
151 |
|
356 |
* First version
|
357 |
|
358 |
== Upgrade Notice ==
|
359 |
+
= 2.56 2014-07-21 =
|
360 |
+
* Fixed account status check logic. Previous version makes unnecessary test API calls when the plugin asks account status check.
|
361 |
+
|
362 |
= 2.55 2014-07-11 =
|
363 |
* Fixed bug with account status function. In backend the plugin showed notice 'Please don’t forget to disable CAPTCHA if you have it!' on every page.
|
364 |
|