Skip to content

Commit a8e12e8

Browse files
authored
Merge pull request #830 from CleanTalk/beta
Beta to 6.83
2 parents b5d1463 + 8b60c8d commit a8e12e8

106 files changed

Lines changed: 6665 additions & 444 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.

.eslintrc.js

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,43 @@ module.exports = {
1111
'js/src/cleantalk-users-checkspam.js',
1212
'js/src/cleantalk-users-editscreen.js',
1313
],
14-
overrides: [],
14+
overrides: [
15+
{
16+
files: ['js/src/react/**/*.js'],
17+
extends: [
18+
'plugin:react/recommended',
19+
'plugin:react/jsx-runtime',
20+
],
21+
parserOptions: {
22+
ecmaVersion: 'latest',
23+
sourceType: 'module',
24+
ecmaFeatures: {
25+
jsx: true,
26+
},
27+
},
28+
plugins: ['react'],
29+
settings: {
30+
react: {
31+
version: 'detect',
32+
},
33+
},
34+
rules: {
35+
'react/prop-types': 'off',
36+
'react/react-in-jsx-scope': 'off',
37+
'react/jsx-uses-react': 'off',
38+
'require-jsdoc': 'off',
39+
'valid-jsdoc': 'off',
40+
'linebreak-style': 'off',
41+
'no-invalid-this': 'off',
42+
'max-len': 'off',
43+
'no-unused-vars': ['error', {varsIgnorePattern: 'React', args: 'none'}],
44+
},
45+
globals: {
46+
wp: 'readonly',
47+
cleantalkModal: 'readonly',
48+
},
49+
},
50+
],
1551
parserOptions: {
1652
ecmaVersion: 'latest',
1753
},

cleantalk.php

Lines changed: 28 additions & 8 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.82
7+
Version: 6.83
88
Author: CleanTalk - Anti-Spam Protection <welcome@cleantalk.org>
99
Author URI: https://cleantalk.org
1010
Text Domain: cleantalk-spam-protect
@@ -720,6 +720,7 @@ function apbct_wpms__delete_blog(WP_Site $old_site)
720720
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-find-spam.php');
721721
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-admin.php');
722722
require_once(CLEANTALK_PLUGIN_DIR . 'inc/cleantalk-settings.php');
723+
require_once(CLEANTALK_PLUGIN_DIR . 'inc/apbct-sync-react.php');
723724

724725
add_action('admin_init', 'apbct_admin__init', 1);
725726

@@ -887,12 +888,15 @@ function apbct_sfw__check()
887888
global $apbct, $spbc, $cleantalk_url_exclusions;
888889

889890
// Turn off the SpamFireWall if current url in the exceptions list and WordPress core pages
891+
$core_page_to_skip_check = array('/feed');
890892
if ( ! empty($cleantalk_url_exclusions) && is_array($cleantalk_url_exclusions) ) {
891-
$core_page_to_skip_check = array('/feed');
892-
foreach ( array_merge($cleantalk_url_exclusions, $core_page_to_skip_check) as $v ) {
893-
if ( apbct_is_in_uri($v) ) {
894-
return;
895-
}
893+
$cleantalk_url_exclusions = array_merge($cleantalk_url_exclusions, $core_page_to_skip_check);
894+
} else {
895+
$cleantalk_url_exclusions = $core_page_to_skip_check;
896+
}
897+
foreach ( $cleantalk_url_exclusions as $v ) {
898+
if ( apbct_is_in_uri($v) ) {
899+
return;
896900
}
897901
}
898902

@@ -1011,14 +1015,30 @@ function apbct_plugin_redirect()
10111015
{
10121016
global $apbct;
10131017
wp_suspend_cache_addition(true);
1018+
$redirect = get_option('ct_plugin_do_activation_redirect', false);
10141019
if (
1015-
get_option('ct_plugin_do_activation_redirect', false) &&
1020+
$redirect &&
10161021
delete_option('ct_plugin_do_activation_redirect') &&
10171022
! Get::get('activate-multi')
10181023
) {
10191024
ct_account_status_check(null, false);
10201025
apbct_sfw_update__init(3); // Updating SFW
1021-
wp_redirect($apbct->settings_link);
1026+
1027+
if ( is_string($redirect) && $redirect !== '1' ) {
1028+
$redirect_url = $redirect;
1029+
} else {
1030+
$redirect_url = $apbct->settings_link;
1031+
if (
1032+
function_exists('apbct_settings__needs_signup_wizard') &&
1033+
apbct_settings__needs_signup_wizard() &&
1034+
empty($apbct->api_key)
1035+
) {
1036+
$redirect_url = apbct_settings__get_signup_wizard_url();
1037+
}
1038+
}
1039+
1040+
wp_safe_redirect($redirect_url);
1041+
exit;
10221042
}
10231043
wp_suspend_cache_addition(false);
10241044
}

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"wp-cli/wp-cli-bundle": "*",
1919
"mockery/mockery": "*",
2020
"cleantalk/apbct-installer": "*",
21-
"cleantalk/contacts-encoder": "*"
21+
"cleantalk/contacts-encoder": "2.0.18",
22+
"cleantalk/rate-limiter": "*"
2223
},
2324
"scripts": {
2425
"test": [

css/cleantalk-admin.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-admin.css

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
}
141141

142142
.apbct-table-actions-wrapper {
143-
background: #FСFСFС;
143+
background: #FCFCFC;
144144
border-radius: 2px;
145145
padding: 5px !important;
146146
border: 1px solid lightgray;
@@ -156,3 +156,92 @@
156156
max-width: 50%;
157157
}
158158
}
159+
160+
/* Review banner styles */
161+
.apbct-notice.apbct-banner-success {
162+
padding: 16px 32px !important;
163+
background-color: #ffffff !important;
164+
box-shadow: 0px 4px 15px #84848440 !important;
165+
border-left-color: #00BB5D !important;
166+
}
167+
168+
.apbct-banner-content {
169+
display: flex;
170+
flex-wrap: wrap;
171+
justify-content: space-between;
172+
row-gap: 16px;
173+
}
174+
175+
.apbct-banner-content-wrapper {
176+
display: flex;
177+
flex-wrap: wrap;
178+
gap: 16px;
179+
justify-content: space-between;
180+
}
181+
182+
.apbct-banner-text-wrapper {
183+
margin-top: 16px;
184+
margin-left: 32px;
185+
}
186+
187+
.apbct-banner-button {
188+
display: block;
189+
padding: 16px 50px;
190+
color: #FFFFFF !important;
191+
border-radius: 8px;
192+
font-size: 16px;
193+
font-weight: 500;
194+
text-decoration: none !important;
195+
text-align: center;
196+
align-content: center;
197+
}
198+
199+
.apbct-banner-button-green {
200+
background-color: #00BB5D !important;
201+
}
202+
203+
.apbct-banner-button-green:hover {
204+
background-color: #00a34f !important;
205+
}
206+
207+
.apbct-banner-button-wrapper {
208+
display: grid;
209+
gap: 12px;
210+
align-content: center;
211+
text-align: center;
212+
margin-right: 24px;
213+
margin-left: 32px;
214+
}
215+
216+
.apbct-banner-title {
217+
font-size: 24px;
218+
line-height: 29px;
219+
font-weight: 500;
220+
color: #000000;
221+
}
222+
223+
.apbct-banner-subtitle {
224+
font-size: 14px;
225+
line-height: 22px;
226+
font-weight: 400;
227+
color: #444444;
228+
margin-top: 8px;
229+
}
230+
231+
.apbct-banner-big-subtitle {
232+
font-size: 16px;
233+
}
234+
235+
.apbct-banner-link {
236+
font-size: 16px;
237+
line-height: 24px;
238+
font-weight: 400;
239+
color: #026E88 !important;
240+
}
241+
242+
.apbct-banner-dismiss-link {
243+
font-weight: 400;
244+
font-size: 14px;
245+
line-height: 22px;
246+
color: #646464 !important;
247+
}

i18n/cleantalk-spam-protect.pot

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2494,3 +2494,144 @@ msgstr ""
24942494
#. Author of the plugin
24952495
msgid "СleanTalk - Anti-Spam Protection <welcome@cleantalk.org>"
24962496
msgstr ""
2497+
2498+
#: inc/cleantalk-settings.php
2499+
msgid "Get access key manually"
2500+
msgstr ""
2501+
2502+
#: js/src/react/hooks/useSync.js
2503+
msgid "Checking access key..."
2504+
msgstr ""
2505+
2506+
#: js/src/react/hooks/useSync.js
2507+
msgid "Updating SpamFireWall..."
2508+
msgstr ""
2509+
2510+
#: js/src/react/hooks/useSync.js
2511+
msgid "Sending feedback..."
2512+
msgstr ""
2513+
2514+
#: js/src/react/hooks/useSync.js
2515+
msgid "Updating dashboard data..."
2516+
msgstr ""
2517+
2518+
#: js/src/react/hooks/useSync.js
2519+
msgid "Adjusting environment..."
2520+
msgstr ""
2521+
2522+
#: js/src/react/hooks/useSync.js
2523+
msgid "Finishing setup..."
2524+
msgstr ""
2525+
2526+
#: js/src/react/components/SignupWizard/Screens/SignupInterface.js
2527+
msgid "Connect to Account"
2528+
msgstr ""
2529+
2530+
#: js/src/react/components/SignupWizard/Screens/SignupInterface.js
2531+
msgid "Please, wait..."
2532+
msgstr ""
2533+
2534+
#: js/src/react/components/SignupWizard/Screens/SignupInterface.js
2535+
msgid "Request failed. Please try again."
2536+
msgstr ""
2537+
2538+
#: js/src/react/components/SignupWizard/Screens/SignupInterface.js
2539+
msgid "Protect your website in under 60 seconds"
2540+
msgstr ""
2541+
2542+
#: js/src/react/components/SignupWizard/Screens/SignupInterface.js
2543+
msgid "Top-rated spam and bot protection for WordPress"
2544+
msgstr ""
2545+
2546+
#: js/src/react/components/SignupWizard/Screens/SignupInterface.js
2547+
msgid "Protects comments, registrations, and contact forms automatically"
2548+
msgstr ""
2549+
2550+
#: js/src/react/components/SignupWizard/Screens/SignupInterface.js
2551+
msgid "No CAPTCHAs, no puzzles, and no visitor friction"
2552+
msgstr ""
2553+
2554+
#: js/src/react/components/SignupWizard/Screens/SignupInterface.js
2555+
msgid "What happens next?"
2556+
msgstr ""
2557+
2558+
#: js/src/react/components/SignupWizard/Screens/SignupInterface.js
2559+
msgid "Once connected, the plugin synchronizes with the CleanTalk cloud, updates the spam database, and enables protection for your forms."
2560+
msgstr ""
2561+
2562+
#: js/src/react/components/SignupWizard/Screens/SignupInterface.js
2563+
msgid "Connect your website to CleanTalk cloud"
2564+
msgstr ""
2565+
2566+
#: js/src/react/components/SignupWizard/Screens/SignupInterface.js
2567+
msgid "Email address"
2568+
msgstr ""
2569+
2570+
#: js/src/react/components/SignupWizard/Screens/SignupInterface.js
2571+
msgid "I agree to the Privacy Policy and"
2572+
msgstr ""
2573+
2574+
#: js/src/react/components/SignupWizard/Screens/SignupInterface.js
2575+
msgid "License Agreement"
2576+
msgstr ""
2577+
2578+
#: js/src/react/components/SignupWizard/Screens/SignupInterface.js
2579+
msgid "I already have an Access Key"
2580+
msgstr ""
2581+
2582+
#: js/src/react/components/SignupWizard/Screens/SignupInterface.js
2583+
msgid "Skip setup wizard"
2584+
msgstr ""
2585+
2586+
#: js/src/react/components/SignupWizard/Screens/AccessKeyInterface.js
2587+
msgid "Connect to CleanTalk"
2588+
msgstr ""
2589+
2590+
#: js/src/react/components/SignupWizard/Screens/AccessKeyInterface.js
2591+
msgid "Go to previous step"
2592+
msgstr ""
2593+
2594+
#: js/src/react/components/SignupWizard/Screens/AccessKeyInterface.js
2595+
msgid "Connect your site to CleanTalk cloud"
2596+
msgstr ""
2597+
2598+
#: js/src/react/components/SignupWizard/Screens/AccessKeyInterface.js
2599+
msgid "Copy the access key you have received via email or you can get it from "
2600+
msgstr ""
2601+
2602+
#: js/src/react/components/SignupWizard/Screens/AccessKeyInterface.js
2603+
msgid "Cloud Dashboard"
2604+
msgstr ""
2605+
2606+
#: js/src/react/components/SignupWizard/Screens/AccessKeyInterface.js
2607+
msgid "If your account has multiple domains select the one you want to use."
2608+
msgstr ""
2609+
2610+
#: js/src/react/components/SignupWizard/Screens/AccessKeyInterface.js
2611+
msgid "Access key"
2612+
msgstr ""
2613+
2614+
#: js/src/react/components/SignupWizard/Screens/ConnectingInterface.js
2615+
msgid "Connecting your site to CleanTalk cloud"
2616+
msgstr ""
2617+
2618+
#: js/src/react/components/SignupWizard/Screens/SuccessInterface.js
2619+
msgid "Everything is good!"
2620+
msgstr ""
2621+
2622+
#: js/src/react/components/SignupWizard/Screens/SuccessInterface.js
2623+
#, javascript-format
2624+
msgid "The plugin is ready to protect %s. After closing this window, your site will be fully protected against spam."
2625+
msgstr ""
2626+
2627+
#: js/src/react/components/SignupWizard/Screens/SuccessInterface.js
2628+
msgid "Go to settings"
2629+
msgstr ""
2630+
2631+
#: js/src/react/components/SignupWizard/Screens/ErrorInterface.js
2632+
msgid "Contact support"
2633+
msgstr ""
2634+
2635+
#: js/src/react/components/SignupWizard/Screens/ErrorInterface.js
2636+
msgid "Try again"
2637+
msgstr ""

0 commit comments

Comments
 (0)