Version Description
October 7 2019 = * Fix: WPMS settings logic. * Using default database storage engine for tables.
Download this release
Release Info
Developer | Safronik |
Plugin | Spam protection, AntiSpam, FireWall by CleanTalk |
Version | 5.127.1 |
Comparing to | |
See all releases |
Code changes from version 5.127 to 5.127.1
- cleantalk.php +5 -4
- inc/cleantalk-public.php +11 -9
- inc/cleantalk-settings.php +3 -4
- inc/cleantalk-updater.php +15 -1
- lib/CleantalkState.php +1 -1
- readme.txt +9 -1
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, no Captcha, premium anti-spam plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms.
|
6 |
-
Version: 5.127
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: http://cleantalk.org
|
9 |
Text Domain: cleantalk
|
@@ -43,7 +43,7 @@ define('APBCT_SEESION__CHANCE_TO_CLEAN', 100);
|
|
43 |
// Different params
|
44 |
define('APBCT_REMOTE_CALL_SLEEP', 5); // Minimum time between remote call
|
45 |
|
46 |
-
if(!defined('CLEANTALK_PLUGIN_DIR')){
|
47 |
|
48 |
define('CLEANTALK_PLUGIN_DIR', dirname(__FILE__ ) . '/');
|
49 |
|
@@ -801,10 +801,11 @@ function apbct_deactivation__delete_blog_tables() {
|
|
801 |
* Redirects admin to plugin settings after activation.
|
802 |
*/
|
803 |
function apbct_plugin_redirect()
|
804 |
-
{
|
|
|
805 |
if (get_option('ct_plugin_do_activation_redirect', false) && !isset($_GET['activate-multi'])){
|
806 |
delete_option('ct_plugin_do_activation_redirect');
|
807 |
-
wp_redirect(
|
808 |
}
|
809 |
}
|
810 |
|
3 |
Plugin Name: Anti-Spam 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.
|
6 |
+
Version: 5.127.1
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: http://cleantalk.org
|
9 |
Text Domain: cleantalk
|
43 |
// Different params
|
44 |
define('APBCT_REMOTE_CALL_SLEEP', 5); // Minimum time between remote call
|
45 |
|
46 |
+
if( !defined( 'CLEANTALK_PLUGIN_DIR' ) ){
|
47 |
|
48 |
define('CLEANTALK_PLUGIN_DIR', dirname(__FILE__ ) . '/');
|
49 |
|
801 |
* Redirects admin to plugin settings after activation.
|
802 |
*/
|
803 |
function apbct_plugin_redirect()
|
804 |
+
{
|
805 |
+
global $apbct;
|
806 |
if (get_option('ct_plugin_do_activation_redirect', false) && !isset($_GET['activate-multi'])){
|
807 |
delete_option('ct_plugin_do_activation_redirect');
|
808 |
+
wp_redirect($apbct->settings_link);
|
809 |
}
|
810 |
}
|
811 |
|
inc/cleantalk-public.php
CHANGED
@@ -1282,10 +1282,11 @@ function apbct_comment__Wordpress__doNotify($maybe_notify, $comment_ID){
|
|
1282 |
|
1283 |
/**
|
1284 |
* Add notification setting link
|
1285 |
-
*
|
1286 |
-
* @param
|
1287 |
-
* @param
|
1288 |
-
*
|
|
|
1289 |
*/
|
1290 |
function apbct_comment__Wordpress__changeMailNotificationGroups($notify_message, $comment_id){
|
1291 |
$website = parse_url(get_option('siteurl'),PHP_URL_HOST);
|
@@ -1297,11 +1298,12 @@ function apbct_comment__Wordpress__changeMailNotificationGroups($notify_message,
|
|
1297 |
|
1298 |
/**
|
1299 |
* Change email notification recipients
|
1300 |
-
*
|
|
|
|
|
|
|
|
|
1301 |
* @global SpbcState $apbct
|
1302 |
-
* @param type $emails
|
1303 |
-
* @param type $comment_id
|
1304 |
-
* @return type
|
1305 |
*/
|
1306 |
function apbct_comment__Wordpress__changeMailNotificationRecipients($emails, $comment_id){
|
1307 |
global $apbct;
|
@@ -1310,7 +1312,7 @@ function apbct_comment__Wordpress__changeMailNotificationRecipients($emails, $co
|
|
1310 |
|
1311 |
/**
|
1312 |
* Changes email notification for spam comment for native Wordpress comment system
|
1313 |
-
*
|
1314 |
* @param string $notify_message Body of email notification
|
1315 |
* @param int $comment_id Comment id
|
1316 |
* @return string Body for email notification
|
1282 |
|
1283 |
/**
|
1284 |
* Add notification setting link
|
1285 |
+
*
|
1286 |
+
* @param string $notify_message
|
1287 |
+
* @param integer $comment_id
|
1288 |
+
*
|
1289 |
+
* @return string
|
1290 |
*/
|
1291 |
function apbct_comment__Wordpress__changeMailNotificationGroups($notify_message, $comment_id){
|
1292 |
$website = parse_url(get_option('siteurl'),PHP_URL_HOST);
|
1298 |
|
1299 |
/**
|
1300 |
* Change email notification recipients
|
1301 |
+
*
|
1302 |
+
* @param array $emails
|
1303 |
+
* @param integer $comment_id
|
1304 |
+
*
|
1305 |
+
* @return array
|
1306 |
* @global SpbcState $apbct
|
|
|
|
|
|
|
1307 |
*/
|
1308 |
function apbct_comment__Wordpress__changeMailNotificationRecipients($emails, $comment_id){
|
1309 |
global $apbct;
|
1312 |
|
1313 |
/**
|
1314 |
* Changes email notification for spam comment for native Wordpress comment system
|
1315 |
+
*
|
1316 |
* @param string $notify_message Body of email notification
|
1317 |
* @param int $comment_id Comment id
|
1318 |
* @return string Body for email notification
|
inc/cleantalk-settings.php
CHANGED
@@ -396,14 +396,13 @@ function apbct_settings__set_fileds__network( $fields ){
|
|
396 |
'white_label' => array(
|
397 |
'type' => 'checkbox',
|
398 |
'title' => __('Enable White Label Mode', 'cleantalk'),
|
399 |
-
'description' => sprintf(__("
|
400 |
'childrens' => array('white_label__hoster_key', 'white_label__plugin_name', 'allow_custom_key'),
|
401 |
'network' => true,
|
402 |
-
'long_description' => true,
|
403 |
),
|
404 |
'white_label__hoster_key' => array(
|
405 |
'title' => __('Hoster API Key', 'cleantalk'),
|
406 |
-
'description' => sprintf(__("
|
407 |
'type' => 'text',
|
408 |
'parent' => 'white_label',
|
409 |
'class' => 'apbct_settings-field_wrapper--sub',
|
@@ -412,7 +411,7 @@ function apbct_settings__set_fileds__network( $fields ){
|
|
412 |
),
|
413 |
'white_label__plugin_name' => array(
|
414 |
'title' => __('Plugin name', 'cleantalk'),
|
415 |
-
'description' => sprintf(__("
|
416 |
'type' => 'text',
|
417 |
'parent' => 'white_label',
|
418 |
'class' => 'apbct_settings-field_wrapper--sub',
|
396 |
'white_label' => array(
|
397 |
'type' => 'checkbox',
|
398 |
'title' => __('Enable White Label Mode', 'cleantalk'),
|
399 |
+
'description' => sprintf(__("Learn more information %shere%s.", 'cleantalk'), '<a tearget="_blank" href="https://cleantalk.org/ru/help/hosting-white-label">', '</a>'),
|
400 |
'childrens' => array('white_label__hoster_key', 'white_label__plugin_name', 'allow_custom_key'),
|
401 |
'network' => true,
|
|
|
402 |
),
|
403 |
'white_label__hoster_key' => array(
|
404 |
'title' => __('Hoster API Key', 'cleantalk'),
|
405 |
+
'description' => sprintf(__("You can get it in %sCleantalk's Control Panel%s", 'cleantalk'), '<a tearget="_blank" href="https://cleantalk.org/my/?cp_mode=hosting-antispam">', '</a>'),
|
406 |
'type' => 'text',
|
407 |
'parent' => 'white_label',
|
408 |
'class' => 'apbct_settings-field_wrapper--sub',
|
411 |
),
|
412 |
'white_label__plugin_name' => array(
|
413 |
'title' => __('Plugin name', 'cleantalk'),
|
414 |
+
'description' => sprintf(__("Specify plugin name. Leave empty for deafult %sAntispam by Cleantalk%s", 'cleantalk'), '<b>', '</b>'),
|
415 |
'type' => 'text',
|
416 |
'parent' => 'white_label',
|
417 |
'class' => 'apbct_settings-field_wrapper--sub',
|
inc/cleantalk-updater.php
CHANGED
@@ -371,4 +371,18 @@ function apbct_update_to_5_127_0(){
|
|
371 |
: $apbct->settings['use_static_js_key'];
|
372 |
$apbct->saveSettings();
|
373 |
}
|
374 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
371 |
: $apbct->settings['use_static_js_key'];
|
372 |
$apbct->saveSettings();
|
373 |
}
|
374 |
+
}
|
375 |
+
|
376 |
+
function apbct_update_to_5_127_1(){
|
377 |
+
if(APBCT_WPMS && is_main_site()){
|
378 |
+
global $apbct;
|
379 |
+
$network_settings = get_site_option( 'cleantalk_network_settings' );
|
380 |
+
if( $network_settings !== false && empty( $network_settings['allow_custom_key'] ) && empty( $network_settings['white_label'] ) ){
|
381 |
+
$network_settings['allow_custom_key'] = 1;
|
382 |
+
update_site_option( 'cleantalk_network_settings', $network_settings );
|
383 |
+
}
|
384 |
+
if( $network_settings !== false && $network_settings['white_label'] == 1 && $apbct->data['moderate'] == 0 ){
|
385 |
+
ct_account_status_check( $network_settings['apikey'] ? $network_settings['apikey'] : $apbct->settings['apikey'], false);
|
386 |
+
}
|
387 |
+
}
|
388 |
+
}
|
lib/CleantalkState.php
CHANGED
@@ -188,7 +188,7 @@ class CleantalkState
|
|
188 |
|
189 |
// Key
|
190 |
'apikey' => '',
|
191 |
-
'allow_custom_key' =>
|
192 |
|
193 |
// White label settings
|
194 |
'white_label' => 0,
|
188 |
|
189 |
// Key
|
190 |
'apikey' => '',
|
191 |
+
'allow_custom_key' => 1,
|
192 |
|
193 |
// White label settings
|
194 |
'white_label' => 0,
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: safronik
|
|
3 |
Tags: spam, antispam, protection, comments, firewall
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.3
|
6 |
-
Stable tag: 5.127
|
7 |
License: GPLv2
|
8 |
|
9 |
Spam protection, antispam, all-in-one, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
|
@@ -568,6 +568,10 @@ If your website has forms that send data to external sources, you can enable opt
|
|
568 |
10. Website's options.
|
569 |
|
570 |
== Changelog ==
|
|
|
|
|
|
|
|
|
571 |
= 5.127 September 30 2019 =
|
572 |
* Fix: Delete redirect notice on external forms
|
573 |
* Fix: Storing spam for 15 days.
|
@@ -1994,6 +1998,10 @@ If your website has forms that send data to external sources, you can enable opt
|
|
1994 |
* First version
|
1995 |
|
1996 |
== Upgrade Notice ==
|
|
|
|
|
|
|
|
|
1997 |
= 5.127 September 30 2019 =
|
1998 |
* Fix: Delete redirect notice on external forms
|
1999 |
* Fix: Storing spam for 15 days.
|
3 |
Tags: spam, antispam, protection, comments, firewall
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.3
|
6 |
+
Stable tag: 5.127.1
|
7 |
License: GPLv2
|
8 |
|
9 |
Spam protection, antispam, all-in-one, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
|
568 |
10. Website's options.
|
569 |
|
570 |
== Changelog ==
|
571 |
+
= 5.127.1 October 7 2019 =
|
572 |
+
* Fix: WPMS settings logic.
|
573 |
+
* Using default database storage engine for tables.
|
574 |
+
|
575 |
= 5.127 September 30 2019 =
|
576 |
* Fix: Delete redirect notice on external forms
|
577 |
* Fix: Storing spam for 15 days.
|
1998 |
* First version
|
1999 |
|
2000 |
== Upgrade Notice ==
|
2001 |
+
= 5.127.1 October 7 2019 =
|
2002 |
+
* Fix: WPMS settings logic.
|
2003 |
+
* Using default database storage engine for tables.
|
2004 |
+
|
2005 |
= 5.127 September 30 2019 =
|
2006 |
* Fix: Delete redirect notice on external forms
|
2007 |
* Fix: Storing spam for 15 days.
|