Spam protection, AntiSpam, FireWall by CleanTalk - Version 5.57.1

Version Description

February 8 2017 = * Fix for notice logic.

Download this release

Release Info

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

Code changes from version 5.57 to 5.57.1

Files changed (3) hide show
  1. cleantalk.php +3 -3
  2. inc/cleantalk-admin.php +47 -28
  3. readme.txt +7 -1
cleantalk.php CHANGED
@@ -3,12 +3,12 @@
3
  Plugin Name: Spam Protection by CleanTalk
4
  Plugin URI: http://cleantalk.org
5
  Description: Max power, all-in-one, no Captcha, premium anti-spam plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms. Formerly Anti-Spam by CleanTalk.
6
- Version: 5.57
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
- $cleantalk_plugin_version='5.57';
11
- $ct_agent_version = 'wordpress-557';
12
  $cleantalk_executed=false;
13
  $ct_sfw_updated = false;
14
 
3
  Plugin Name: Spam Protection by CleanTalk
4
  Plugin URI: http://cleantalk.org
5
  Description: Max power, all-in-one, no Captcha, premium anti-spam plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms. Formerly Anti-Spam by CleanTalk.
6
+ Version: 5.57.1
7
  Author: СleanTalk <welcome@cleantalk.org>
8
  Author URI: http://cleantalk.org
9
  */
10
+ $cleantalk_plugin_version='5.57.1';
11
+ $ct_agent_version = 'wordpress-5571';
12
  $cleantalk_executed=false;
13
  $ct_sfw_updated = false;
14
 
inc/cleantalk-admin.php CHANGED
@@ -1428,58 +1428,77 @@ function cleantalk_admin_notice_message(){
1428
 
1429
  $ct_options = ct_get_options();
1430
  $ct_data = ct_get_data();
1431
- $page = get_current_screen();
1432
 
1433
  if(!isset($ct_data['moderate_ip']))
 
1434
  $ct_data['moderate_ip'] = 0;
 
 
 
 
 
 
1435
 
1436
  $show_notice = true;
1437
- $value = (current_user_can('activate_plugins') ? 1 : 0);
1438
- $show_ct_notice_trial = (isset($ct_data['show_ct_notice_trial']) ? intval($ct_data['show_ct_notice_trial']) : 0);
1439
- $show_ct_notice_renew = (isset($ct_data['show_ct_notice_renew']) ? intval($ct_data['show_ct_notice_renew']) : 0);
1440
- $next_notice_show = (isset($ct_data['next_notice_show']) ? $ct_data['next_notice_show'] : 0); //inactive
1441
- $user_token = (isset($ct_data['user_token']) && $ct_data['user_token'] != '' ? "&user_token={$ct_data['user_token']}" : "");
1442
- $notice_from_report = (isset($ct_data['ct_show_notice_from_report']) ? $ct_data['ct_show_notice_from_report'] : 0); //inactive
1443
-
1444
- //Notice when users came from the daily report letter
1445
- if ($ct_data['moderate_ip'] == 0 && $show_notice && $notice_from_report && !ct_valid_key() && $value==1 && (is_network_admin() || is_admin())) {
1446
-
1447
- if($page->id == 'settings_page_cleantalk')
1448
- echo '<div class="error"><h3>' .__("To see the anti-spam log and complete the setup, please get the Access key.", 'cleantalk'). '</h3></div>';
1449
-
1450
- $show_notice = false;
1451
  }
1452
-
1453
- //Unable to get key automatically (if ct_admin_init().getAutoKey() returns error)
 
 
 
1454
  if ($show_notice && $show_ct_notice_autokey && $value==1 && (is_network_admin() || (!defined('WP_ALLOW_MULTISITE')||defined('WP_ALLOW_MULTISITE')&&WP_ALLOW_MULTISITE==false) && is_admin())) {
1455
  echo '<div class="error"><h3>' . sprintf(__("Unable to get Access key automatically: %s", 'cleantalk'), $ct_notice_autokey_value);
1456
  echo " <a target='__blank' style='margin-left: 10px' href='https://cleantalk.org/register?platform=wordpress&email=".urlencode(ct_get_admin_email())."&website=".urlencode(parse_url(get_option('siteurl'),PHP_URL_HOST))."'>".__('Get the Access key', 'cleantalk').'</a></h3></div>';
1457
  }
1458
-
1459
- //key == "" || "enter key"
1460
  if ($ct_data['moderate_ip'] == 0 && $show_notice && ct_valid_key($ct_options['apikey']) === false && $value==1 &&
1461
- (is_network_admin() || (!defined('WP_ALLOW_MULTISITE')||defined('WP_ALLOW_MULTISITE')&&WP_ALLOW_MULTISITE==false) && is_admin())) {
1462
-
1463
- if($page->id == 'settings_page_cleantalk')
1464
- echo '<div class="error"><h3>' . sprintf(__("Please enter Access Key in %s settings to enable anti spam protection!", 'cleantalk'), "<a href=\"options-general.php?page=cleantalk\">CleanTalk plugin</a>") . '</h3></div>';
1465
-
1466
  $show_notice = false;
1467
  }
1468
 
1469
- //"Trial period ends" notice from ct_admin_init().noticePaidTill()
 
 
 
 
 
 
 
 
1470
  if ($show_notice && $show_ct_notice_trial ==1 && $value==1 && (is_network_admin() || is_admin()) && $ct_data['moderate_ip'] == 0) {
1471
  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&cp_mode=antispam\" target=\"_blank\"><b>premium version</b></a>") . '</h3></div>';
1472
  $show_notice = false;
1473
  }
1474
 
1475
- //Renew notice from ct_admin_init().noticePaidTill()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1476
  if ($show_notice && $show_ct_notice_renew == 1 && $value==1 && (is_network_admin() || is_admin()) && $ct_data['moderate_ip'] != 1) {
1477
  $button_html = "<a href=\"http://cleantalk.org/my/bill/recharge?utm_source=wp-backend&utm_medium=cpc&utm_campaign=WP%20backend%20renew$user_token&cp_mode=antispam\" target=\"_blank\">" . '<input type="button" class="button button-primary" value="' . __('RENEW ANTI-SPAM', 'cleantalk') . '" />' . "</a>";
1478
  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&cp_mode=antispam\" target=\"_blank\"><b>" . __('next year', 'cleantalk') ."</b></a>") . '<br /><br />' . $button_html . '</h3></div>';
1479
  $show_notice = false;
1480
  }
1481
-
1482
- //"Wrong access key" notice (if ct_update_option().METHOD_notice_validate_key returns a error)
1483
  if ($show_notice && $show_ct_notice_online != '' && $value==1 && (is_network_admin() || is_admin()) && $ct_data['moderate_ip'] != 1) {
1484
  if($show_ct_notice_online === 'N' && $value==1 && (is_network_admin() || (!defined('WP_ALLOW_MULTISITE')||defined('WP_ALLOW_MULTISITE')&&WP_ALLOW_MULTISITE==false) && is_admin()) && $ct_data['moderate_ip'] != 1){
1485
  echo '<div class="error"><h3><b>';
1428
 
1429
  $ct_options = ct_get_options();
1430
  $ct_data = ct_get_data();
 
1431
 
1432
  if(!isset($ct_data['moderate_ip']))
1433
+ {
1434
  $ct_data['moderate_ip'] = 0;
1435
+ }
1436
+
1437
+ $user_token = '';
1438
+ if (isset($ct_data['user_token']) && $ct_data['user_token'] != '') {
1439
+ $user_token = '&user_token=' . $ct_data['user_token'];
1440
+ }
1441
 
1442
  $show_notice = true;
1443
+
1444
+ if(current_user_can('activate_plugins'))
1445
+ {
1446
+ $value = 1;
 
 
 
 
 
 
 
 
 
 
1447
  }
1448
+ else
1449
+ {
1450
+ $value = 0;
1451
+ }
1452
+
1453
  if ($show_notice && $show_ct_notice_autokey && $value==1 && (is_network_admin() || (!defined('WP_ALLOW_MULTISITE')||defined('WP_ALLOW_MULTISITE')&&WP_ALLOW_MULTISITE==false) && is_admin())) {
1454
  echo '<div class="error"><h3>' . sprintf(__("Unable to get Access key automatically: %s", 'cleantalk'), $ct_notice_autokey_value);
1455
  echo " <a target='__blank' style='margin-left: 10px' href='https://cleantalk.org/register?platform=wordpress&email=".urlencode(ct_get_admin_email())."&website=".urlencode(parse_url(get_option('siteurl'),PHP_URL_HOST))."'>".__('Get the Access key', 'cleantalk').'</a></h3></div>';
1456
  }
1457
+
 
1458
  if ($ct_data['moderate_ip'] == 0 && $show_notice && ct_valid_key($ct_options['apikey']) === false && $value==1 &&
1459
+ (is_network_admin() || (!defined('WP_ALLOW_MULTISITE')||defined('WP_ALLOW_MULTISITE')&&WP_ALLOW_MULTISITE==false) && is_admin()) ) {
1460
+ echo '<div class="error"><h3>' . sprintf(__("Please enter Access Key in %s settings to enable anti spam protection!", 'cleantalk'), "<a href=\"options-general.php?page=cleantalk\">CleanTalk plugin</a>") . '</h3></div>';
 
 
 
1461
  $show_notice = false;
1462
  }
1463
 
1464
+ if(isset($ct_data['show_ct_notice_trial']))
1465
+ {
1466
+ $show_ct_notice_trial = intval($ct_data['show_ct_notice_trial']);
1467
+ }
1468
+ else
1469
+ {
1470
+ $show_ct_notice_trial = 0;
1471
+ }
1472
+
1473
  if ($show_notice && $show_ct_notice_trial ==1 && $value==1 && (is_network_admin() || is_admin()) && $ct_data['moderate_ip'] == 0) {
1474
  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&cp_mode=antispam\" target=\"_blank\"><b>premium version</b></a>") . '</h3></div>';
1475
  $show_notice = false;
1476
  }
1477
 
1478
+ if(isset($ct_data['next_notice_show']))
1479
+ {
1480
+ $next_notice_show=$ct_data['next_notice_show'];
1481
+ }
1482
+ else
1483
+ {
1484
+ $next_notice_show=0;
1485
+ }
1486
+
1487
+ if(isset($ct_data['show_ct_notice_renew']))
1488
+ {
1489
+ $show_ct_notice_renew = intval($ct_data['show_ct_notice_renew']);
1490
+ }
1491
+ else
1492
+ {
1493
+ $show_ct_notice_renew = 0;
1494
+ }
1495
+
1496
  if ($show_notice && $show_ct_notice_renew == 1 && $value==1 && (is_network_admin() || is_admin()) && $ct_data['moderate_ip'] != 1) {
1497
  $button_html = "<a href=\"http://cleantalk.org/my/bill/recharge?utm_source=wp-backend&utm_medium=cpc&utm_campaign=WP%20backend%20renew$user_token&cp_mode=antispam\" target=\"_blank\">" . '<input type="button" class="button button-primary" value="' . __('RENEW ANTI-SPAM', 'cleantalk') . '" />' . "</a>";
1498
  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&cp_mode=antispam\" target=\"_blank\"><b>" . __('next year', 'cleantalk') ."</b></a>") . '<br /><br />' . $button_html . '</h3></div>';
1499
  $show_notice = false;
1500
  }
1501
+
 
1502
  if ($show_notice && $show_ct_notice_online != '' && $value==1 && (is_network_admin() || is_admin()) && $ct_data['moderate_ip'] != 1) {
1503
  if($show_ct_notice_online === 'N' && $value==1 && (is_network_admin() || (!defined('WP_ALLOW_MULTISITE')||defined('WP_ALLOW_MULTISITE')&&WP_ALLOW_MULTISITE==false) && is_admin()) && $ct_data['moderate_ip'] != 1){
1504
  echo '<div class="error"><h3><b>';
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: znaeff, shagimuratov, serge00, sartemd174
3
  Tags: spam, anti-spam, antispam, anti spam, bbpress, buddypress, captcha, capcha, captha, catcha, cf7 spam, comments, contact form spam, signup, spammers, spammy, woocommerce, wordpress spam, subscription, gravity spam, jetpack, bots, contact form 7, contact form, registrations, ninja, Fast Secure Contact, Gravity forms, formidable, mailchimp, s2member, protection, protect, email, plugin, contact, recaptcha, google captcha, google recaptcha, blacklist, prevent spam comments, wordpress, User Frontend, bulk delete, bulk remove, widget, review, firewall, cleantalk, mailpoet, profile builder, comment spam, registration spam, spam comments, comment moderation, spam bots, block spam, signup spam, spam blocker, spam filter, user registration spam,pingback,trackback, anti-spam plugin, varnish, amp, spam free, userpro,honeypot,puzzle,quiz,survey,poll,security, amo forms, caldera forms, visual form builder, contact form clean and simple
4
  Requires at least: 3.0
5
  Tested up to: 4.7.1
6
- Stable tag: 5.57
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -486,6 +486,9 @@ WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enab
486
  1. The Dashboard with a map of most spam active countries per your account.
487
 
488
  == Changelog ==
 
 
 
489
  = 5.57 February 8 2017 =
490
  * Setting page changes.
491
  * Bug fixes for WooCommerce.
@@ -1235,6 +1238,9 @@ WordPress 3.0 at least. PHP 5 with CURL or file_get_contents() function and enab
1235
  * First version
1236
 
1237
  == Upgrade Notice ==
 
 
 
1238
  = 5.57 February 8 2017 =
1239
  * Setting page changes.
1240
  * Bug fixes for WooCommerce.
3
  Tags: spam, anti-spam, antispam, anti spam, bbpress, buddypress, captcha, capcha, captha, catcha, cf7 spam, comments, contact form spam, signup, spammers, spammy, woocommerce, wordpress spam, subscription, gravity spam, jetpack, bots, contact form 7, contact form, registrations, ninja, Fast Secure Contact, Gravity forms, formidable, mailchimp, s2member, protection, protect, email, plugin, contact, recaptcha, google captcha, google recaptcha, blacklist, prevent spam comments, wordpress, User Frontend, bulk delete, bulk remove, widget, review, firewall, cleantalk, mailpoet, profile builder, comment spam, registration spam, spam comments, comment moderation, spam bots, block spam, signup spam, spam blocker, spam filter, user registration spam,pingback,trackback, anti-spam plugin, varnish, amp, spam free, userpro,honeypot,puzzle,quiz,survey,poll,security, amo forms, caldera forms, visual form builder, contact form clean and simple
4
  Requires at least: 3.0
5
  Tested up to: 4.7.1
6
+ Stable tag: 5.57.1
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
486
  1. The Dashboard with a map of most spam active countries per your account.
487
 
488
  == Changelog ==
489
+ = 5.57.1 February 8 2017 =
490
+ * Fix for notice logic.
491
+
492
  = 5.57 February 8 2017 =
493
  * Setting page changes.
494
  * Bug fixes for WooCommerce.
1238
  * First version
1239
 
1240
  == Upgrade Notice ==
1241
+ = 5.57.1 February 8 2017 =
1242
+ * Fix for notice logic.
1243
+
1244
  = 5.57 February 8 2017 =
1245
  * Setting page changes.
1246
  * Bug fixes for WooCommerce.