Skip to content

Commit 58ee35a

Browse files
committed
Merge remote-tracking branch 'origin/dev' into GFA-Elementor-forms-visible-fields-#2
# Conflicts: # js/apbct-public-bundle.min.js # js/apbct-public-bundle_ext-protection.min.js # js/apbct-public-bundle_ext-protection.min.js.map # js/apbct-public-bundle_full-protection.min.js # js/apbct-public-bundle_full-protection.min.js.map # js/apbct-public-bundle_int-protection.min.js # js/apbct-public-bundle_int-protection.min.js.map
2 parents d2b8cab + c726065 commit 58ee35a

21 files changed

+160
-126
lines changed

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.50.1-dev
7+
Version: 6.50.2-dev
88
Author: CleanTalk - Anti-Spam Protection <welcome@cleantalk.org>
99
Author URI: https://cleantalk.org
1010
Text Domain: cleantalk-spam-protect

inc/cleantalk-admin.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
use Cleantalk\Antispam\CleantalkRequest;
55
use Cleantalk\ApbctWP\AdjustToEnvironmentModule\AdjustToEnvironmentHandler;
66
use Cleantalk\ApbctWP\AJAXService;
7+
use Cleantalk\ApbctWP\Antispam\EmailEncoder;
78
use Cleantalk\ApbctWP\CleantalkSettingsTemplates;
89
use Cleantalk\ApbctWP\Escape;
910
use Cleantalk\ApbctWP\Variables\Get;
@@ -538,7 +539,7 @@ function apbct_admin__enqueue_scripts($hook)
538539
APBCT_VERSION
539540
);
540541

541-
wp_localize_script('ct_admin_common', 'ctAdminCommon', array(
542+
$data = array(
542543
'_ajax_nonce' => $apbct->ajax_service->getAdminNonce(),
543544
'_ajax_url' => admin_url('admin-ajax.php', 'relative'),
544545
'plugin_name' => $apbct->plugin_name,
@@ -548,7 +549,9 @@ function apbct_admin__enqueue_scripts($hook)
548549
'notice_when_deleting_user_text' => esc_html__('Warning! Users are deleted without the possibility of restoring them, you can only restore them from a site backup.', 'cleantalk-spam-protect'),
549550
'apbctNoticeDismissSuccess' => esc_html__('Thank you for the review! We strive to make our Anti-Spam plugin better every day.', 'cleantalk-spam-protect'),
550551
'apbctNoticeForceProtectionOn' => esc_html__('This option affects the reflection of the page by checking the user and adds a cookie "apbct_force_protection_check", which serves as an indicator of successful or unsuccessful verification. If the check is successful, it will no longer run.', 'cleantalk-spam-protect'),
551-
));
552+
);
553+
$data = array_merge($data, EmailEncoder::getLocalizationText());
554+
wp_localize_script('ct_admin_common', 'ctAdminCommon', $data);
552555

553556
// DASHBOARD page JavaScript and CSS
554557
if ( $hook == 'index.php' && apbct_is_user_role_in(array('administrator')) ) {

inc/cleantalk-ajax.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,25 @@ function ct_ajax_hook($message_obj = null)
448448
}
449449
}
450450

451+
// SiteReviews integration
452+
if ( Post::getString('action', 'glsr_public_action') &&
453+
apbct_is_plugin_active('site-reviews/site-reviews.php')
454+
) {
455+
$post_info['comment_type'] = 'site_reviews_integration';
456+
if (isset($_POST['site-reviews']['title'])) {
457+
$ct_post_temp['title'] = $_POST['site-reviews']['title'];
458+
}
459+
if (isset($_POST['site-reviews']['name'])) {
460+
$ct_post_temp['nickname'] = $_POST['site-reviews']['name'];
461+
}
462+
if (isset($_POST['site-reviews']['email'])) {
463+
$ct_post_temp['email'] = $_POST['site-reviews']['email'];
464+
}
465+
if (isset($_POST['site-reviews']['content'])) {
466+
$ct_post_temp['comment'] = $_POST['site-reviews']['content'];
467+
}
468+
}
469+
451470
// Nasa registration
452471
if ( Post::get('action') === 'nasa_process_register' ) {
453472
$post_info['comment_type'] = 'nasa_process_register';
@@ -724,6 +743,19 @@ function ct_ajax_hook($message_obj = null)
724743
die();
725744
}
726745

746+
if ( Post::getString('action', 'glsr_public_action') ) {
747+
$result = array(
748+
'success' => false,
749+
'data' => array(
750+
'errors' => array(),
751+
'message' => $ct_result->comment,
752+
),
753+
);
754+
@header('Content-Type: application/json; charset=' . get_option('blog_charset'));
755+
print json_encode($result);
756+
die();
757+
}
758+
727759
if ( Post::get('action') === 'mymail_form_submit' ) {
728760
$result = array('success' => false, 'html' => $ct_result->comment);
729761
@header('Content-Type: application/json; charset=' . get_option('blog_charset'));

js/apbct-public-bundle.min.js

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

js/apbct-public-bundle_ext-protection.min.js

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

js/apbct-public-bundle_ext-protection.min.js.map

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

js/apbct-public-bundle_full-protection.min.js

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

js/apbct-public-bundle_full-protection.min.js.map

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

js/apbct-public-bundle_int-protection.min.js

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

js/apbct-public-bundle_int-protection.min.js.map

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

0 commit comments

Comments
 (0)