Skip to content

Commit e399c9b

Browse files
committed
Merge dev
2 parents d135eec + 726f437 commit e399c9b

64 files changed

Lines changed: 1222 additions & 570 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/releaseNotice.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ jobs:
1717
token: ${{ secrets.MATRIX_USER_TOKEN }}
1818
message: |
1919
${{ github.event.repository.description }} <strong>v${{github.event.release.name}}</strong> released
20-
${{github.event.release.html_url}}
21-
22-
${{ github.event.release.body }}
20+
<br>${{github.event.release.html_url}}
21+
<br>
22+
<br><pre>${{ github.event.release.body }}</pre>

cleantalk.php

Lines changed: 36 additions & 10 deletions
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.55.99-dev
7+
Version: 6.56.99-dev
88
Author: CleanTalk - Anti-Spam Protection <welcome@cleantalk.org>
99
Author URI: https://cleantalk.org
1010
Text Domain: cleantalk-spam-protect
@@ -166,6 +166,24 @@
166166
$apbct->setConnectionReports();
167167
// SFW update sentinel
168168
$apbct->setSFWUpdateSentinel();
169+
// User IP Keeper - used for checkers
170+
$apbct->setLoginIPKeeper();
171+
172+
add_action('wp_login', 'apbct_wp_login_actions', 10, 2);
173+
174+
/**
175+
* Actions for hook 'wp-login'.
176+
* @param $user_login
177+
* @param $wp_user
178+
*
179+
* @return void
180+
*/
181+
function apbct_wp_login_actions($_user_login, $wp_user)
182+
{
183+
global $apbct;
184+
$apbct->login_ip_keeper->addUserIP($wp_user);
185+
apbct_add_admin_ip_to_swf_whitelist($wp_user);
186+
}
169187

170188
// Disabling comments
171189
if ( $apbct->settings['comments__disable_comments__all'] || $apbct->settings['comments__disable_comments__posts'] || $apbct->settings['comments__disable_comments__pages'] || $apbct->settings['comments__disable_comments__media'] ) {
@@ -269,7 +287,7 @@ function apbct_register_my_rest_routes()
269287
global $apbct;
270288

271289
// Self cron
272-
$ct_cron = new Cron();
290+
$ct_cron = Cron::getInstance();
273291
$tasks_to_run = $ct_cron->checkTasks(); // Check for current tasks. Drop tasks inner counters.
274292
if (
275293
$tasks_to_run && // There are tasks to run
@@ -577,14 +595,6 @@ function apbct_write_js_errors($data)
577595
add_filter('happyforms_validate_submission', 'apbct_form_happyforms_test_spam', 1, 3);
578596
add_filter('happyforms_use_hash_protection', '__return_false');
579597

580-
// WPForms
581-
// Adding fields
582-
add_action('wpforms_frontend_output', 'apbct_form__WPForms__addField', 1000, 5);
583-
// Gathering data to validate
584-
add_filter('wpforms_process_before_filter', 'apbct_from__WPForms__gatherData', 100, 2);
585-
// Do spam check
586-
add_filter('wpforms_process_initial_errors', 'apbct_form__WPForms__showResponse', 100, 2);
587-
588598
// Formidable
589599
add_filter('frm_entries_before_create', 'apbct_form__formidable__testSpam', 999999, 2);
590600
add_action('frm_entries_footer_scripts', 'apbct_form__formidable__footerScripts', 20, 2);
@@ -2742,6 +2752,22 @@ function ct_account_status_check($api_key = null, $process_errors = true)
27422752
$apbct->data['notice_trial'] = TT::getArrayValueAsInt($result, 'trial', 0);
27432753
$apbct->data['notice_review'] = TT::getArrayValueAsInt($result, 'show_review', 0);
27442754

2755+
if ($apbct->data['notice_show']) {
2756+
$notice_banners = API::getNoticeBanners($api_key);
2757+
2758+
if (isset($notice_banners['operation_status'], $notice_banners['banners']) && $notice_banners['operation_status'] === 'SUCCESS') {
2759+
if (isset($notice_banners['banners']['TRIAL']['level'])) {
2760+
$apbct->data['notice_trial_level'] = strtolower($notice_banners['banners']['TRIAL']['level']);
2761+
}
2762+
if (isset($notice_banners['banners']['RENEW']['level'])) {
2763+
$apbct->data['notice_renew_level'] = strtolower($notice_banners['banners']['RENEW']['level']);
2764+
}
2765+
if (isset($notice_banners['banners']['REVIEW']['level'])) {
2766+
$apbct->data['notice_review_level'] = strtolower($notice_banners['banners']['REVIEW']['level']);
2767+
}
2768+
}
2769+
}
2770+
27452771
// Other
27462772
$apbct->data['service_id'] = TT::getArrayValueAsInt($result, 'service_id', 0);
27472773
$apbct->data['user_id'] = TT::getArrayValueAsInt($result, 'user_id', 0);

css/cleantalk-public.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/src/cleantalk-public.css

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,18 +106,32 @@ input[class*='apbct'].apbct_special_field{
106106
height: 48px;
107107
border-radius: 50%;
108108
position: relative;
109+
left: calc(50% - 27px);
110+
top: calc(50% - 27px);
109111
animation: apbctIframePreloaderRotate 1s linear infinite
110112
}
111113

112-
.apbct-iframe-preloader::before {
114+
.apbct-iframe-preloader-spin {
113115
content: "";
114116
box-sizing: border-box;
115117
position: absolute;
116118
inset: 0px;
117119
border-radius: 50%;
118-
border: 5px solid #FFF;
120+
border: 6px solid #FFF;
119121
animation: apbctIframePreloaderPrixClipFix 2s linear infinite ;
120122
}
123+
124+
.apbct-iframe-preloader-text {
125+
color: white;
126+
background: black;
127+
display: block;
128+
width: 100%;
129+
text-align: center;
130+
position: absolute;
131+
top: 60%;
132+
}
133+
134+
121135
/*Fix The Real Person popup for theme Spacious By ThemeGrill */
122136
.comments-area .comment-list article .comment-author {
123137
overflow: visible !important;

inc/cleantalk-common.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ function apbct_array($array)
7676
// It uses for BuddyPress registrations to avoid double checks
7777
$ct_negative_comment = null;
7878

79-
80-
add_action('wp_login', 'apbct_add_admin_ip_to_swf_whitelist', 10, 2);
81-
8279
/**
8380
* Public action 'plugins_loaded' - Loads locale, see http://codex.wordpress.org/Function_Reference/load_plugin_textdomain
8481
*/

inc/cleantalk-integrations-by-class.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
'plugin_class' => '',
1515
'wp_includes' => true,
1616
),
17+
'WPForms' => array(
18+
'plugin_path' => ['wpforms-lite/wpforms.php', 'wpforms/wpforms.php'],
19+
'plugin_class' => 'WPForms',
20+
),
1721
);
1822

1923
add_action('plugins_loaded', function () use ($apbct_integrations_by_class) {

inc/cleantalk-integrations-by-hook.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,11 @@
399399
'setting' => 'forms__contact_forms_test',
400400
'ajax' => true
401401
),
402+
'WPZOOMForms' => array(
403+
'hook' => 'admin_post_nopriv_wpzf_submit',
404+
'setting' => 'forms__contact_forms_test',
405+
'ajax' => false
406+
),
402407
'Newsletter' => array(
403408
'hook' => 'newsletter_action',
404409
'setting' => 'forms__contact_forms_test',
@@ -409,6 +414,11 @@
409414
'setting' => 'forms__contact_forms_test',
410415
'ajax' => true
411416
),
417+
'LoginSignupPopup' => array(
418+
'hook' => 'xoo_el_form_action',
419+
'setting' => 'forms__registrations_test',
420+
'ajax' => true
421+
),
412422
);
413423

414424
add_action('plugins_loaded', function () use ($apbct_active_integrations) {

inc/cleantalk-pluggable.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,6 +1325,7 @@ function apbct_is_skip_request($ajax = false, $ajax_message_obj = array())
13251325
) &&
13261326
Post::get('action') === 'edd_add_to_cart' ||
13271327
Post::get('action') === 'edd_get_shipping_rate' ||
1328+
Post::get('action') === 'edd_check_email' ||
13281329
Post::get('action') === 'edd_recalculate_discounts_pro'
13291330
) {
13301331
return 'Easy Digital Downloads service action';
@@ -1538,6 +1539,14 @@ class_exists('Cleantalk\Antispam\Integrations\CleantalkInternalForms')
15381539
) {
15391540
return 'ChatyContactForm';
15401541
}
1542+
1543+
// skip Login/Signup Popup - has direct integration
1544+
if (
1545+
apbct_is_plugin_active('easy-login-woocommerce/xoo-el-main.php') &&
1546+
Request::getString('action') === 'xoo_el_form_action'
1547+
) {
1548+
return 'Login/Signup Popup';
1549+
}
15411550
} else {
15421551
/*****************************************/
15431552
/* Here is non-ajax requests skipping */

0 commit comments

Comments
 (0)