Version Description
February 10 2020 = * Fix: Add no-index meta tag to search page only. * Fix: Namespace issues.
Download this release
Release Info
Developer | shagimuratov |
Plugin | Spam protection, AntiSpam, FireWall by CleanTalk |
Version | 5.133.2 |
Comparing to | |
See all releases |
Code changes from version 5.133.1 to 5.133.2
- cleantalk.php +2 -2
- inc/cleantalk-common.php +1 -0
- inc/cleantalk-public.php +17 -0
- inc/cleantalk-settings.php +1 -1
- lib/Cleantalk/Templates/Singleton.php +31 -28
- readme.txt +6 -2
cleantalk.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Anti-Spam by CleanTalk
|
4 |
Plugin URI: https://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.133.
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: https://cleantalk.org
|
9 |
Text Domain: cleantalk
|
@@ -224,6 +224,7 @@ if( !defined( 'CLEANTALK_PLUGIN_DIR' ) ){
|
|
224 |
// Default search
|
225 |
//add_filter( 'get_search_form', 'apbct_forms__search__addField' );
|
226 |
add_filter( 'get_search_query', 'apbct_forms__search__testSpam' );
|
|
|
227 |
|
228 |
// Remote calls
|
229 |
if(isset($_GET['spbc_remote_call_token'], $_GET['spbc_remote_call_action'], $_GET['plugin_name']) && in_array($_GET['plugin_name'], array('antispam','anti-spam', 'apbct'))){
|
@@ -1669,7 +1670,6 @@ function ct_account_status_check($api_key = null, $process_errors = true){
|
|
1669 |
preg_replace('/http[s]?:\/\//', '', get_option('siteurl'), 1),
|
1670 |
'antispam'
|
1671 |
);
|
1672 |
-
error_log(var_export($result,1));
|
1673 |
|
1674 |
if(empty($result['error']) || !empty($result['valid'])){
|
1675 |
|
3 |
Plugin Name: Anti-Spam by CleanTalk
|
4 |
Plugin URI: https://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.133.2
|
7 |
Author: СleanTalk <welcome@cleantalk.org>
|
8 |
Author URI: https://cleantalk.org
|
9 |
Text Domain: cleantalk
|
224 |
// Default search
|
225 |
//add_filter( 'get_search_form', 'apbct_forms__search__addField' );
|
226 |
add_filter( 'get_search_query', 'apbct_forms__search__testSpam' );
|
227 |
+
add_action( 'wp_head', 'apbct_search_add_noindex', 1 );
|
228 |
|
229 |
// Remote calls
|
230 |
if(isset($_GET['spbc_remote_call_token'], $_GET['spbc_remote_call_action'], $_GET['plugin_name']) && in_array($_GET['plugin_name'], array('antispam','anti-spam', 'apbct'))){
|
1670 |
preg_replace('/http[s]?:\/\//', '', get_option('siteurl'), 1),
|
1671 |
'antispam'
|
1672 |
);
|
|
|
1673 |
|
1674 |
if(empty($result['error']) || !empty($result['valid'])){
|
1675 |
|
inc/cleantalk-common.php
CHANGED
@@ -733,6 +733,7 @@ function ct_get_fields_any($arr, $message=array(), $email = null, $nickname = ar
|
|
733 |
'ebd_settings',
|
734 |
'ebd_downloads_',
|
735 |
'ecole_origine',
|
|
|
736 |
);
|
737 |
|
738 |
// Reset $message if we have a sign-up data
|
733 |
'ebd_settings',
|
734 |
'ebd_downloads_',
|
735 |
'ecole_origine',
|
736 |
+
'signature',
|
737 |
);
|
738 |
|
739 |
// Reset $message if we have a sign-up data
|
inc/cleantalk-public.php
CHANGED
@@ -721,6 +721,23 @@ function apbct_forms__search__testSpam( $search ){
|
|
721 |
return $search;
|
722 |
}
|
723 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
724 |
/**
|
725 |
* Test woocommerce checkout form for spam
|
726 |
*
|
721 |
return $search;
|
722 |
}
|
723 |
|
724 |
+
function apbct_search_add_noindex() {
|
725 |
+
|
726 |
+
global $apbct;
|
727 |
+
|
728 |
+
if(
|
729 |
+
! is_search() || // If it is search results
|
730 |
+
$apbct->settings['search_test'] == 0 ||
|
731 |
+
$apbct->settings['protect_logged_in'] != 1 && is_user_logged_in() // Skip processing for logged in users.
|
732 |
+
){
|
733 |
+
return ;
|
734 |
+
}
|
735 |
+
|
736 |
+
echo '<!-- meta by Cleantalk AntiSpam Protection plugin -->' . "\n";
|
737 |
+
echo '<meta name="robots" content="noindex,nofollow" />' . "\n";
|
738 |
+
|
739 |
+
}
|
740 |
+
|
741 |
/**
|
742 |
* Test woocommerce checkout form for spam
|
743 |
*
|
inc/cleantalk-settings.php
CHANGED
@@ -133,7 +133,7 @@ function apbct_settings__set_fileds( $fields ){
|
|
133 |
'title' => __('Test default Wordpress search form for spam', 'cleantalk'),
|
134 |
'description' => __('Spam protection for Search form.', 'cleantalk')
|
135 |
. (!$apbct->white_label || is_main_site()
|
136 |
-
? sprintf(__('Read more about %sspam protection for Search form%s on our blog.', 'cleantalk'),
|
137 |
'<a href="https://blog.cleantalk.org/how-to-protect-website-search-from-spambots/" target="_blank">',
|
138 |
'</a>'
|
139 |
)
|
133 |
'title' => __('Test default Wordpress search form for spam', 'cleantalk'),
|
134 |
'description' => __('Spam protection for Search form.', 'cleantalk')
|
135 |
. (!$apbct->white_label || is_main_site()
|
136 |
+
? sprintf(__('Read more about %sspam protection for Search form%s on our blog. “noindex” tag will be placed in meta derictive on search page.', 'cleantalk'),
|
137 |
'<a href="https://blog.cleantalk.org/how-to-protect-website-search-from-spambots/" target="_blank">',
|
138 |
'</a>'
|
139 |
)
|
lib/Cleantalk/Templates/Singleton.php
CHANGED
@@ -2,31 +2,34 @@
|
|
2 |
|
3 |
namespace Cleantalk\Templates;
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
}
|
|
|
|
|
|
2 |
|
3 |
namespace Cleantalk\Templates;
|
4 |
|
5 |
+
if(!trait_exists('Cleantalk\Templates\Singleton')) {
|
6 |
+
|
7 |
+
trait Singleton{
|
8 |
+
|
9 |
+
static $instance;
|
10 |
+
|
11 |
+
public function __construct(){}
|
12 |
+
public function __wakeup(){}
|
13 |
+
public function __clone(){}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Constructor
|
17 |
+
* @return $this
|
18 |
+
*/
|
19 |
+
public static function getInstance(){
|
20 |
+
if (!isset(static::$instance)) {
|
21 |
+
static::$instance = new static;
|
22 |
+
static::$instance->init();
|
23 |
+
}
|
24 |
+
return static::$instance;
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Alternative constructor
|
29 |
+
*/
|
30 |
+
private function init(){
|
31 |
+
|
32 |
+
}
|
33 |
+
|
34 |
+
}
|
35 |
+
}
|
readme.txt
CHANGED
@@ -4,10 +4,10 @@ Tags: spam, antispam, woocommerce, comments, firewall
|
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.3
|
6 |
Requires PHP: 5.4
|
7 |
-
Stable tag: 5.133.
|
8 |
License: GPLv2
|
9 |
|
10 |
-
Spam protection,
|
11 |
|
12 |
== Description ==
|
13 |
|
@@ -566,6 +566,10 @@ If your website has forms that send data to external sources, you can enable opt
|
|
566 |
|
567 |
== Changelog ==
|
568 |
|
|
|
|
|
|
|
|
|
569 |
= 5.133.1 February 03 2020 =
|
570 |
* Fix: PHP 7.4 issues.
|
571 |
* Fix: Woocommerce options moved to a separate block.
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.3
|
6 |
Requires PHP: 5.4
|
7 |
+
Stable tag: 5.133.2
|
8 |
License: GPLv2
|
9 |
|
10 |
+
Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
|
11 |
|
12 |
== Description ==
|
13 |
|
566 |
|
567 |
== Changelog ==
|
568 |
|
569 |
+
= 5.133.2 February 10 2020 =
|
570 |
+
* Fix: Add no-index meta tag to search page only.
|
571 |
+
* Fix: Namespace issues.
|
572 |
+
|
573 |
= 5.133.1 February 03 2020 =
|
574 |
* Fix: PHP 7.4 issues.
|
575 |
* Fix: Woocommerce options moved to a separate block.
|