Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
6c09f10
Mod. ForceAltCookies. Removed the use of force alt cookies for integr…
AntonV1211 Mar 17, 2026
df01fa1
Tests
AntonV1211 Mar 17, 2026
79dcaa1
Fix. Integrations. Improved catching woo add_to_cart request.
svfcode Mar 18, 2026
f0a5a5a
fix eslint
svfcode Mar 18, 2026
d2b5b5b
Upd. BotDetector. Update load strategy.
svfcode Mar 18, 2026
b831580
Upd ver 6.75.99-dev
AntonV1211 Mar 19, 2026
1db9385
Merge, rebuild js
AntonV1211 Mar 19, 2026
0e9000d
Upd ver 6.75.99-fix
AntonV1211 Mar 19, 2026
5d6b496
Upd. Settings. Update RC flow for license_update.
svfcode Mar 19, 2026
dcae25d
Merge branch 'fix' of https://github.com/CleanTalk/wordpress-antispam…
svfcode Mar 19, 2026
494d756
fix psalm
svfcode Mar 19, 2026
4004313
Fix. Integrations. Improved BuddyBoss RestAPI copability.
svfcode Mar 20, 2026
0cfaef6
Merge dev
AntonV1211 Mar 20, 2026
24003c6
Merge pull request #761 from CleanTalk/forcealt7_av
AntonV1211 Mar 23, 2026
44e7561
Fix. Integrations. Fixed SiteGround cache SFW block page.
svfcode Mar 23, 2026
76c8618
Upd. Integrations. Improve FluentBooking flow to attach meta data to …
svfcode Mar 25, 2026
4c1c82b
Merge pull request #763 from CleanTalk/upd-integration-fluentbooking
svfcode Mar 25, 2026
3895b2e
Fix. Code. Unit tests fixed: `TestFluentForms`, `TestNinjaForms`.
Glomberg Mar 26, 2026
6237cf4
Fix. JS. Gathering. Passing js_on independent of gathering loaded.
alexandergull Mar 26, 2026
2a328c8
Fix. Integrations. QuForm. Fixed js_on param gathering.
alexandergull Mar 26, 2026
d3c4644
Fix. Users. Edit the deletion of a non-checkable user
AntonV1211 Mar 27, 2026
2072165
Merge pull request #767 from CleanTalk/json_extract_from_gathring.ag
alexandergull Mar 31, 2026
130be76
Upd. Settings. Updated flow to check pingback. (#764)
svfcode Mar 31, 2026
a1514c2
Upd. Settings. `Bot Detector` setting - bot-detector setting removed.…
Glomberg Mar 31, 2026
26d0da7
Merge remote-tracking branch 'origin/fix' into dev
Glomberg Mar 31, 2026
d0ab186
Fix. Code. Re-minify assets.
Glomberg Mar 31, 2026
80f33e6
Version: 6.76 and changelog updated.
Glomberg Mar 31, 2026
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
5 changes: 4 additions & 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.75
Version: 6.76
Author: CleanTalk - Anti-Spam Protection <welcome@cleantalk.org>
Author URI: https://cleantalk.org
Text Domain: cleantalk-spam-protect
Expand Down Expand Up @@ -694,6 +694,9 @@ function apbct_wpms__delete_blog(WP_Site $old_site)
// After plugin loaded - to load locale as described in manual
add_action('init', 'apbct_plugin_loaded');

// SiteGround Speed Optimizer: skip cache for URLs with apbct_no_cache.
add_action('plugins_loaded', 'apbct_sgo_optimizer__register_bypass_query_params', 1);

if ( ! empty($apbct->settings['data__use_ajax']) &&
! apbct_is_in_uri('.xml') &&
! apbct_is_in_uri('.xsl')
Expand Down
28 changes: 25 additions & 3 deletions inc/cleantalk-common.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ function apbct_base_call($params = array(), $reg_flag = false)

// Misc
'auth_key' => $apbct->api_key,
'js_on' => apbct_js_test(Sanitize::cleanTextField(Cookie::get('ct_checkjs')), true) ? 1 : apbct_js_test(TT::toString(Post::get('ct_checkjs'))),
'js_on' => apbct_js_test(Sanitize::cleanTextField(Cookie::getString('ct_checkjs')), true)
? 1
: apbct_js_test(Post::getString('ct_checkjs')),

'agent' => APBCT_AGENT,
'sender_info' => $sender_info,
Expand Down Expand Up @@ -1857,7 +1859,6 @@ function apbct__bot_detector_get_fired_exclusions()
*/
function apbct__bot_detector_get_fd_log()
{
global $apbct;
$result = array(
'plugin_status' => 'OK',
'error_msg' => '',
Expand All @@ -1872,7 +1873,7 @@ function apbct__bot_detector_get_fd_log()
}

try {
if ( TT::toString($apbct->settings['data__bot_detector_enabled']) === '0') {
if ( ! apbct__is_bot_detector_enabled() ) {
throw new \Exception('bot detector library usage is disabled');
}
// Retrieve bot detector frontend data log from Alt Sessions
Expand Down Expand Up @@ -1929,3 +1930,24 @@ function apbct__bot_detector_get_custom_exclusion_from_settings()
}
return $exclusions;
}

/**
* Check if Bot-Detector is enabled/disabled
*
* @return bool
*/
function apbct__is_bot_detector_enabled()
{
global $apbct;

// Constant is preferred
if ( isset($apbct->service_constants->bot_detector_enabled) && $apbct->service_constants->bot_detector_enabled->isDefined() ) {
return (bool) $apbct->service_constants->bot_detector_enabled->getValue();
}
// Check by $apbct->data
if ( isset($apbct->data['bot_detector_enabled']) ) {
return (bool) $apbct->data['bot_detector_enabled'];
}
// By default - enabled
return true;
}
2 changes: 1 addition & 1 deletion inc/cleantalk-integrations-by-hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
'ajax' => true
),
'PiotnetAddonsForElementorPro' => array(
'hook' => array('pafe_ajax_form_builder'),
'hook' => 'pafe_ajax_form_builder',
'setting' => 'forms__contact_forms_test',
'ajax' => true
),
Expand Down
7 changes: 6 additions & 1 deletion inc/cleantalk-pluggable.php
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@ function apbct_is_skip_request($ajax = false, $ajax_message_obj = array())
'fl_builder_subscribe_form_submit', // FLBuilderForms has direct integration
'tutor_pro_social_authentication', // Tutor Pro social authentication, we trust a third-party service
'drplus_login', // Doctor Plus theme login
'fluent_cal_schedule_meeting', // Fluent Booking has direct integration
);

// Skip test if
Expand Down Expand Up @@ -1429,7 +1430,11 @@ function apbct_is_skip_request($ajax = false, $ajax_message_obj = array())
apbct_is_plugin_active('piotnet-addons-for-elementor-pro/piotnet-addons-for-elementor-pro.php') ||
apbct_is_plugin_active('piotnet-addons-for-elementor/piotnet-addons-for-elementor.php')
) &&
Post::get('action') === 'pafe_ajax_form_builder_preview_submission' ) {
(
Post::get('action') === 'pafe_ajax_form_builder_preview_submission' ||
Post::get('action') === 'pafe_ajax_form_builder'
)
) {
return 'PAFE';
}

Expand Down
12 changes: 9 additions & 3 deletions inc/cleantalk-public-integrations.php
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,11 @@ function ct_registration_errors($errors, $sanitized_user_login = null, $user_ema
$checkjs = $checkjs_cookie ?: $checkjs_post;
}

// BuddyBoss Platform use rest api for registration from phone app
if ( apbct_is_plugin_active('buddyboss-app/buddyboss-app.php') && apbct_is_in_uri('/wp-json/buddyboss-app/v1/signup') ) {
$checkjs = Post::getString('checkjs') === 'true' ? 1 : 0;
}

$sender_info = array(
'post_checkjs_passed' => $checkjs_post,
'cookie_checkjs_passed' => $checkjs_cookie,
Expand Down Expand Up @@ -1049,6 +1054,10 @@ function ct_registration_errors($errors, $sanitized_user_login = null, $user_ema
$bp->signup->errors['signup_username'] = $ct_result->comment;
}

if (apbct_is_plugin_active('buddyboss-app/buddyboss-app.php') && apbct_is_in_uri('/wp-json/buddyboss-app/v1/signup')) {
wp_send_json_error(['success' => false, 'message' => $ct_result->comment]);
}

if ( $facebook ) {
/** @psalm-suppress InvalidArrayOffset */
$_POST['FB_userdata']['email'] = '';
Expand Down Expand Up @@ -1870,19 +1879,16 @@ function ct_quform_post_validate($result, $form)
* Filter for POST
*/
$input_array = apply_filters('apbct__filter_post', $form->getValues());

$ct_temp_msg_data = ct_get_fields_any($input_array);
$sender_email = isset($ct_temp_msg_data['email']) ? $ct_temp_msg_data['email'] : '';
$sender_emails_array = isset($ct_temp_msg_data['emails_array']) ? $ct_temp_msg_data['emails_array'] : '';

$checkjs = apbct_js_test(Sanitize::cleanTextField(Cookie::get('ct_checkjs')), true);
$base_call_result = apbct_base_call(
array(
'message' => $form->getValues(),
'sender_email' => $sender_email,
'post_info' => array('comment_type' => $comment_type),
'sender_info' => array('sender_emails_array' => $sender_emails_array),
'js_on' => $checkjs,
)
);

Expand Down
5 changes: 5 additions & 0 deletions inc/cleantalk-public-validate-skip-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,11 @@ function skip_for_ct_contact_form_validate()
Get::equal('wc-ajax', 'wc_stripe_frontend_request') &&
! empty(Post::getString('stripe_applepay_token_key'))
),
// BuddyBoss REST API has a direct integration
'101' => (
apbct_is_plugin_active('buddyboss-platform/buddyboss-platform.php') &&
apbct_is_in_uri('/wp-json/buddyboss/v1/signup')
),
);

foreach ( $exclusions as $exclusion_key => $state ) {
Expand Down
36 changes: 33 additions & 3 deletions inc/cleantalk-public.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function apbct_init()
$apbct->settings['data__pixel'] &&
empty($apbct->pixel_url) &&
!(
$apbct->settings['data__bot_detector_enabled'] === '1' &&
apbct__is_bot_detector_enabled() &&
$apbct->settings['data__pixel'] === '3'
)
) {
Expand Down Expand Up @@ -378,6 +378,36 @@ class_exists('Jetpack', false) &&
}
}

/**
* SiteGround Speed Optimizer: register sgo_bypass_query_params filter.
*/
function apbct_sgo_optimizer__register_bypass_query_params()
{
if ( ! defined('SG_OPTIMIZER_VERSION') ) {
return;
}
add_filter('sgo_bypass_query_params', 'apbct_sgo_bypass_query_params', 10, 1);
}

/**
* Adds apbct_no_cache to SG Optimizer bypass list.
*
* @param string[] $bypass_query_params
*
* @return string[]
*/
function apbct_sgo_bypass_query_params($bypass_query_params)
{
if ( ! is_array($bypass_query_params) ) {
$bypass_query_params = array();
}
if ( ! in_array('apbct_no_cache', $bypass_query_params, true) ) {
$bypass_query_params[] = 'apbct_no_cache';
}

return $bypass_query_params;
}

function apbct_buffer__start()
{
ob_start();
Expand Down Expand Up @@ -540,7 +570,7 @@ function apbct_hook__wp_footer()
(
$apbct->settings['data__pixel'] === '3' &&
! apbct_is_cache_plugins_exists() &&
$apbct->settings['data__bot_detector_enabled'] !== '1'
! apbct__is_bot_detector_enabled()
)
) {
echo '<img alt="Cleantalk Pixel" title="Cleantalk Pixel" id="apbct_pixel" style="display: none;" src="' . Escape::escUrl($apbct->pixel_url) . '">';
Expand Down Expand Up @@ -1245,7 +1275,7 @@ function apbct_enqueue_and_localize_public_scripts()
ApbctEnqueue::getInstance()->js($bundle_name, array(), $in_footer);

// Bot detector
if ( $apbct->settings['data__bot_detector_enabled'] && ! apbct_bot_detector_scripts_exclusion()) {
if ( apbct__is_bot_detector_enabled() && ! apbct_bot_detector_scripts_exclusion()) {
// Attention! Skip old enqueue way for external script.
wp_enqueue_script(
'ct_bot_detector',
Expand Down
32 changes: 23 additions & 9 deletions inc/cleantalk-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -564,14 +564,17 @@ function apbct_settings__set_fields()
'callback' => 'apbct_settings__check_alt_cookies_types'
),
//bot detector
'data__bot_detector_enabled' => array(
'title' => __('Use ', 'cleantalk-spam-protect')
. $apbct->data['wl_brandname']
. __(' JavaScript library', 'cleantalk-spam-protect'),
'description' => __('This option includes external ', 'cleantalk-spam-protect')
. $apbct->data['wl_brandname']
. __(' JavaScript library to getting visitors info data', 'cleantalk-spam-protect'),
'childrens' => array('exclusions__bot_detector')
'bot_detector_state' => array(
'callback' => function () {
printf(
esc_html__('JavaScript library (Bot Detector) is %s', 'cleantalk-spam-protect'),
apbct__is_bot_detector_enabled()
? esc_html__('enabled', 'cleantalk-spam-protect')
: esc_html__('disabled', 'cleantalk-spam-protect')
);
},
'long_description' => true,
'display' => apbct__is_bot_detector_enabled(),
),
'exclusions__bot_detector' => array(
'title' => __('JavaScript Library Exclusions', 'cleantalk-spam-protect'),
Expand All @@ -584,28 +587,31 @@ function apbct_settings__set_fields()
'Regular expression. Use to skip a HTML form from special service field attach.',
'cleantalk-spam-protect'
),
'parent' => 'data__bot_detector_enabled',
'display' => apbct__is_bot_detector_enabled(),
),
'exclusions__bot_detector__form_attributes' => array(
'type' => 'text',
'title' => __('Exclude any forms that has attribute matches.', 'cleantalk-spam-protect'),
'parent' => 'exclusions__bot_detector',
'class' => 'apbct_settings-field_wrapper--sub',
'long_description' => true,
'display' => apbct__is_bot_detector_enabled(),
),
'exclusions__bot_detector__form_children_attributes' => array(
'type' => 'text',
'title' => __('Exclude any forms that includes a child element with attribute matches.', 'cleantalk-spam-protect'),
'parent' => 'exclusions__bot_detector',
'class' => 'apbct_settings-field_wrapper--sub',
'long_description' => true,
'display' => apbct__is_bot_detector_enabled(),
),
'exclusions__bot_detector__form_parent_attributes' => array(
'type' => 'text',
'title' => __('Exclude any forms that includes a parent element with attribute matches.', 'cleantalk-spam-protect'),
'parent' => 'exclusions__bot_detector',
'class' => 'apbct_settings-field_wrapper--sub',
'long_description' => true,
'display' => apbct__is_bot_detector_enabled(),
),
'wp__use_builtin_http_api' => array(
'title' => __("Use WordPress HTTP API", 'cleantalk-spam-protect'),
Expand Down Expand Up @@ -3150,6 +3156,14 @@ function apbct_settings__get__long_description()
'title' => __('Contact data encoding', 'cleantalk-spam-protect'),
'desc' => ContactsEncoder::getEmailEncoderCommonLongDescription(),
),
'bot_detector_state' => array(
'title' => esc_html__('JavaScript library (Bot Detector)', 'cleantalk-spam-protect'),
'desc' => esc_html__("The Bot Detector is a JavaScript library that runs in the visitor's browser and collects behavioral signals to distinguish real users from bots.", 'cleantalk-spam-protect')
. '<br><br>' . esc_html__("This data is sent to the CleanTalk cloud along with each spam check request, significantly improving detection accuracy for spam on any website forms.", 'cleantalk-spam-protect')
. '<br><br>' . esc_html__("Disabling the Bot Detector will reduce anti-spam effectiveness.", 'cleantalk-spam-protect')
. '<br>' . esc_html__("It can only be disabled by adding the following constant to your wp-config.php: define('APBCT_SERVICE__BOT_DETECTOR_ENABLED', false);", 'cleantalk-spam-protect')
. '<br>' . esc_html__("We do not recommend disabling this functionality.", 'cleantalk-spam-protect')
),
);

if (!empty($setting_id) && isset($descriptions[$setting_id])) {
Expand Down
11 changes: 11 additions & 0 deletions inc/cleantalk-updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -1377,3 +1377,14 @@ function apbct_update_to_6_60_0()
}
}
}

function apbct_update_to_6_76_0()
{
global $apbct;

if ( isset($apbct->settings['data__bot_detector_enabled']) ) {
$bot_detector_state = $apbct->settings['data__bot_detector_enabled'];
$apbct->data['bot_detector_enabled'] = $bot_detector_state;
$apbct->saveData();
}
}
2 changes: 1 addition & 1 deletion js/apbct-public-bundle.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/apbct-public-bundle_ext-protection.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/apbct-public-bundle_ext-protection_gathering.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/apbct-public-bundle_full-protection.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/apbct-public-bundle_full-protection_gathering.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/apbct-public-bundle_gathering.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/apbct-public-bundle_int-protection.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/apbct-public-bundle_int-protection_gathering.min.js

Large diffs are not rendered by default.

Loading
Loading