Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cleantalk.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin Name: Anti-Spam by CleanTalk
Plugin URI: https://cleantalk.org
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.
Version: 6.79
Version: 6.79.1
Author: CleanTalk - Anti-Spam Protection <welcome@cleantalk.org>
Author URI: https://cleantalk.org
Text Domain: cleantalk-spam-protect
Expand Down
2 changes: 2 additions & 0 deletions lib/Cleantalk/ApbctWP/AdminNotices.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ public function notice_key_is_empty() // phpcs:ignore PSR1.Methods.CamelCapsMeth

$banner_data->level = 'error';
$banner_data->is_dismissible = ! $this->is_cleantalk_page;
$banner_data->is_show_button = ! $this->is_cleantalk_page;

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

$banner_data->level = 'error';
$banner_data->is_dismissible = ! $this->is_cleantalk_page;
$banner_data->is_show_button = ! $this->is_cleantalk_page;

$banner = new ApbctUniversalBanner($banner_data);
$banner->echoBannerBody();
Expand Down
8 changes: 0 additions & 8 deletions lib/Cleantalk/ApbctWP/ApbctUniversalBanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,4 @@ protected function sanitizeBodyOnEcho($body)

return Escape::escKsesPreset($body, 'apbct_settings__display__banner_template');
}

protected function showBannerButton()
{
if (apbct_is_in_uri('options-general.php?page=cleantalk')) {
return false;
}
return true;
}
}
24 changes: 0 additions & 24 deletions lib/Cleantalk/Common/UniversalBanner/UniversalBanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ private function render()
{
try {
$this->doReplacements($this->replaces);
$this->setBannerButtonVisibility($this->showBannerButton());
$this->validateBodyReplacementResult();
} catch ( \Exception $error) {
$this->banner_body = $error->getMessage();
Expand Down Expand Up @@ -159,20 +158,6 @@ protected function sanitizeBodyString($body)
return htmlspecialchars($body);
}

/**
* Hide the banner button on the state.
* @param bool $state
*
* @return void
*/
private function setBannerButtonVisibility($state = true)
{
if (!$state) {
$regex = '/<a.*href.*id="apbct_button_.*a>/';
$this->banner_body = preg_replace($regex, '', $this->banner_body);
}
}

/**
* Validate the body for unfilled replacements
* @return void
Expand All @@ -187,13 +172,4 @@ private function validateBodyReplacementResult()
throw new \Exception('Template still has unfilled replacements!');
}
}

/**
* Set banner button visibility. If this method returns false, the button wil be hidden.
* @return bool
*/
protected function showBannerButton()
{
return true;
}
}
7 changes: 5 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
=== Anti Spam for Contact Forms, Comments & Online Stores - CleanTalk ===
Contributors: glomberg, alexandergull, sergefcleantalk, antonv1
Tags: antispam, honeypot, contact form spam, captcha, akismet
Tags: antispam, honeypot, contact form spam, captcha, akismet
Requires at least: 4.7
Tested up to: 7.0
Requires PHP: 7.2
Stable tag: 6.79
Stable tag: 6.79.1
License: GPLv2

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

== Changelog ==

= 6.79.1 14.05.2026 =
* Fix. Admin banners. Call-to-action buttons visibility fixed.

= 6.79 14.05.2026 =
* Mod. Settings. Moving the AC option
* Fix. Search forms. Add a sign of 's' GET param to a native search form signs.
Expand Down
Loading