Skip to content

Commit

Permalink
1.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ovx committed Oct 22, 2024
1 parent 106e26b commit 6904050
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 5 deletions.
7 changes: 4 additions & 3 deletions altcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
* Description: ALTCHA is a free, open-source CAPTCHA alternative that offers robust protection without using cookies, ensuring full GDPR compliance by design. It also provides invisible anti-spam and anti-bot protection through ALTCHA's API.
* Author: Altcha.org
* Author URI: https://altcha.org
* Version: 1.10.0
* Stable tag: 1.10.0
* Version: 1.11.0
* Stable tag: 1.11.0
* Requires at least: 5.0
* Requires PHP: 7.3
* Tested up to: 6.6
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

define('ALTCHA_VERSION', '1.10.0');
define('ALTCHA_VERSION', '1.11.0');
define('ALTCHA_WEBSITE', 'https://altcha.org/');
define('ALTCHA_WIDGET_VERSION', '1.0.0');
define('ALTCHA_LANGUAGES', [
Expand Down Expand Up @@ -67,6 +67,7 @@
require plugin_dir_path( __FILE__ ) . './integrations/gravityforms.php';
require plugin_dir_path( __FILE__ ) . './integrations/wpdiscuz.php';
require plugin_dir_path( __FILE__ ) . './integrations/wpforms.php';
require plugin_dir_path( __FILE__ ) . './integrations/wpmembers.php';
require plugin_dir_path( __FILE__ ) . './integrations/wordpress.php';

AltchaPlugin::$widget_script_src = plugin_dir_url(__FILE__) . "public/altcha.min.js";
Expand Down
2 changes: 2 additions & 0 deletions includes/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ function altcha_plugin_active($name) {
return is_plugin_active('contact-form-7/wp-contact-form-7.php');
case 'wpdiscuz':
return is_plugin_active('wpdiscuz/class.WpdiscuzCore.php');
case 'wpmembers':
return is_plugin_active('wp-members/wp-members.php');
case 'wpforms':
return is_plugin_active('wpforms/wpforms.php') || is_plugin_active('wpforms-lite/wpforms.php');
default:
Expand Down
22 changes: 22 additions & 0 deletions integrations/wpmembers.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

if ( ! defined( 'ABSPATH' ) ) exit;

add_action(
'wpmem_pre_register_data',
function () {
$plugin = AltchaPlugin::$instance;
// WP-members uses native wordpress integration and does not have an activation select
// If this hook is being called and wordpress register is enabled, validate altcha
$mode = $plugin->get_integration_wordpress_register();
if (!empty($mode)) {
$altcha = isset($_POST['altcha_register']) ? trim(sanitize_text_field($_POST['altcha_register'])) : '';
if ($plugin->verify($altcha) === false) {
global $wpmem_themsg;
$wpmem_themsg = esc_html__('Registration failed. Please try again later.', 'altcha-spam-protection');
}
}
},
10,
0
);
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Tags: altcha, captcha, spam, anti-spam, anti-bot, antispam, recaptcha, hcaptcha, gdpr
Author: Altcha.org
Author URI: https://altcha.org
Version: 1.10.0
Stable tag: 1.10.0
Version: 1.11.0
Stable tag: 1.11.0
Requires at least: 5.0
Requires PHP: 7.3
Tested up to: 6.6
Expand Down Expand Up @@ -69,6 +69,7 @@ This plugin requires the WordPress REST API. If you are using any "Disable REST
* HTML Forms
* WPDiscuz
* WPForms
* WP-Members
* WordPress Login, Register, Password reset
* WordPress Comments
* Custom HTML (with a short code `[altcha]`)
Expand All @@ -95,6 +96,9 @@ All source code for the plugin, and the ALTCHA widget is available on GitHub. In

== Changelog ==

= 1.11.0 =
* Added support for WP-Members

= 1.10.0 =
* Added support for WPDiscuz

Expand Down

0 comments on commit 6904050

Please sign in to comment.