Skip to content

Commit 5e6fcbc

Browse files
authored
Version: 6.79.1 (#800)
* Fix. Admin banners. Call-to-action buttons visibility fixed. * Version: 6.79.1 and changelog updated.
2 parents 3da47b1 + 545326e commit 5e6fcbc

5 files changed

Lines changed: 8 additions & 35 deletions

File tree

cleantalk.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Plugin Name: Anti-Spam by CleanTalk
55
Plugin URI: https://cleantalk.org
66
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.
7-
Version: 6.79
7+
Version: 6.79.1
88
Author: CleanTalk - Anti-Spam Protection <welcome@cleantalk.org>
99
Author URI: https://cleantalk.org
1010
Text Domain: cleantalk-spam-protect

lib/Cleantalk/ApbctWP/AdminNotices.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ public function notice_key_is_empty() // phpcs:ignore PSR1.Methods.CamelCapsMeth
180180

181181
$banner_data->level = 'error';
182182
$banner_data->is_dismissible = ! $this->is_cleantalk_page;
183+
$banner_data->is_show_button = ! $this->is_cleantalk_page;
183184

184185
$banner = new ApbctUniversalBanner($banner_data);
185186
$banner->echoBannerBody();
@@ -213,6 +214,7 @@ public function notice_key_is_incorrect() // phpcs:ignore PSR1.Methods.CamelCaps
213214

214215
$banner_data->level = 'error';
215216
$banner_data->is_dismissible = ! $this->is_cleantalk_page;
217+
$banner_data->is_show_button = ! $this->is_cleantalk_page;
216218

217219
$banner = new ApbctUniversalBanner($banner_data);
218220
$banner->echoBannerBody();

lib/Cleantalk/ApbctWP/ApbctUniversalBanner.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,4 @@ protected function sanitizeBodyOnEcho($body)
2424

2525
return Escape::escKsesPreset($body, 'apbct_settings__display__banner_template');
2626
}
27-
28-
protected function showBannerButton()
29-
{
30-
if (apbct_is_in_uri('options-general.php?page=cleantalk')) {
31-
return false;
32-
}
33-
return true;
34-
}
3527
}

lib/Cleantalk/Common/UniversalBanner/UniversalBanner.php

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ private function render()
106106
{
107107
try {
108108
$this->doReplacements($this->replaces);
109-
$this->setBannerButtonVisibility($this->showBannerButton());
110109
$this->validateBodyReplacementResult();
111110
} catch ( \Exception $error) {
112111
$this->banner_body = $error->getMessage();
@@ -159,20 +158,6 @@ protected function sanitizeBodyString($body)
159158
return htmlspecialchars($body);
160159
}
161160

162-
/**
163-
* Hide the banner button on the state.
164-
* @param bool $state
165-
*
166-
* @return void
167-
*/
168-
private function setBannerButtonVisibility($state = true)
169-
{
170-
if (!$state) {
171-
$regex = '/<a.*href.*id="apbct_button_.*a>/';
172-
$this->banner_body = preg_replace($regex, '', $this->banner_body);
173-
}
174-
}
175-
176161
/**
177162
* Validate the body for unfilled replacements
178163
* @return void
@@ -187,13 +172,4 @@ private function validateBodyReplacementResult()
187172
throw new \Exception('Template still has unfilled replacements!');
188173
}
189174
}
190-
191-
/**
192-
* Set banner button visibility. If this method returns false, the button wil be hidden.
193-
* @return bool
194-
*/
195-
protected function showBannerButton()
196-
{
197-
return true;
198-
}
199175
}

readme.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
=== Anti Spam for Contact Forms, Comments & Online Stores - CleanTalk ===
22
Contributors: glomberg, alexandergull, sergefcleantalk, antonv1
3-
Tags: antispam, honeypot, contact form spam, captcha, akismet
3+
Tags: antispam, honeypot, contact form spam, captcha, akismet
44
Requires at least: 4.7
55
Tested up to: 7.0
66
Requires PHP: 7.2
7-
Stable tag: 6.79
7+
Stable tag: 6.79.1
88
License: GPLv2
99

1010
Top-rated anti spam protection for WordPress, eCommerce. Blocks spam on forms, comments and registrations automatically. No CAPTCHA.
@@ -381,6 +381,9 @@ CleanTalk stops up to 99.998% of spam bots, so you can disable other anti-spam p
381381

382382
== Changelog ==
383383

384+
= 6.79.1 14.05.2026 =
385+
* Fix. Admin banners. Call-to-action buttons visibility fixed.
386+
384387
= 6.79 14.05.2026 =
385388
* Mod. Settings. Moving the AC option
386389
* Fix. Search forms. Add a sign of 's' GET param to a native search form signs.

0 commit comments

Comments
 (0)