diff --git a/altcha.php b/altcha.php index 15a3101..0b1d328 100644 --- a/altcha.php +++ b/altcha.php @@ -7,8 +7,8 @@ * 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 @@ -16,7 +16,7 @@ * 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', [ @@ -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"; diff --git a/includes/helpers.php b/includes/helpers.php index 60d4718..9915fb3 100644 --- a/includes/helpers.php +++ b/includes/helpers.php @@ -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: diff --git a/integrations/wpmembers.php b/integrations/wpmembers.php new file mode 100644 index 0000000..5681ed6 --- /dev/null +++ b/integrations/wpmembers.php @@ -0,0 +1,22 @@ +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 +); \ No newline at end of file diff --git a/readme.txt b/readme.txt index f68a4ea..6b7116d 100644 --- a/readme.txt +++ b/readme.txt @@ -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 @@ -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]`) @@ -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