Skip to content

Commit 970d794

Browse files
authored
Upd. Integration. HivePress forms protection improved. (#746)
* Upd. Integration. HivePress forms protection improved. * New. Integration. Hivepress registrations protection implemented (#752) * New. Integration. Hivepress registrations protection implemented. * Fix. Integration. Hivepress registrations protection fixed. * Fix. Check email existence. Icon layout fixed for integration `Hivepress`.
1 parent d1c83a2 commit 970d794

22 files changed

Lines changed: 182 additions & 26 deletions

inc/cleantalk-integrations-by-route.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@
1111
'setting' => 'forms__contact_forms_test',
1212
'rest' => true,
1313
),
14+
'HivePress' => array(
15+
'rest_route' => '/hivepress/v1/listings/',
16+
'setting' => 'forms__contact_forms_test',
17+
'rest' => true,
18+
),
19+
'HivePressRegistration' => array(
20+
'rest_route' => '/hivepress/v1/users',
21+
'setting' => 'forms__registrations_test',
22+
'rest' => true,
23+
),
1424
);
1525

1626
add_filter('rest_pre_dispatch', function ($result, $_, $request) use ($apbct_active_rest_integrations) {

inc/cleantalk-pluggable.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1966,6 +1966,14 @@ class_exists('Cleantalk\Antispam\Integrations\CleantalkInternalForms')
19661966
) {
19671967
return 'AsgarosForum';
19681968
}
1969+
1970+
// Plugin Name: HivePress
1971+
if (
1972+
apbct_is_plugin_active('hivepress/hivepress.php') &&
1973+
(apbct_is_in_uri('/hivepress/v1/listings/') || apbct_is_in_uri('/hivepress/v1/users'))
1974+
) {
1975+
return 'Plugin Name: HivePress skip REST route checking';
1976+
}
19691977
}
19701978

19711979
// WP Fusion Abandoned Cart Addon

inc/cleantalk-public-validate.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -211,24 +211,6 @@ function ct_contact_form_validate()
211211
return false;
212212
}
213213

214-
//hivepress theme listing integration
215-
if ( empty($sender_email) &&
216-
function_exists('hivepress') &&
217-
is_callable('hivepress') &&
218-
apbct_is_user_logged_in() &&
219-
$apbct->settings['data__protect_logged_in']
220-
) {
221-
if (! isset($_POST['_model'])) {
222-
$current_user = wp_get_current_user();
223-
if ( ! empty($current_user->data->user_email) ) {
224-
$sender_email = $current_user->data->user_email;
225-
}
226-
} else {
227-
do_action('apbct_skipped_request', __FILE__ . ' -> ' . __FUNCTION__ . '(hivepress theme listing integration):' . __LINE__, $_POST);
228-
return false;
229-
}
230-
}
231-
232214
//tellallfriend integration #1
233215
if ( isset($_POST['TellAFriend_Link']) ) {
234216
$tmp = Sanitize::cleanTextField(Post::get('TellAFriend_Link'));

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: 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_gathering.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_full-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_full-protection_gathering.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_gathering.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

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)