Skip to content

Commit

Permalink
1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ovx committed Aug 15, 2024
1 parent 057dbfc commit 50b7013
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
6 changes: 3 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.6.1
* Stable tag: 1.6.1
* Version: 1.7.0
* Stable tag: 1.7.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.6.1');
define('ALTCHA_VERSION', '1.7.0');
define('ALTCHA_WEBSITE', 'https://altcha.org/');
define('ALTCHA_WIDGET_VERSION', '0.6.7');
define('ALTCHA_LANGUAGES', [
Expand Down
1 change: 1 addition & 0 deletions includes/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ function altcha_settings_init()
"" => "Disable",
"captcha" => "Captcha",
"captcha_spamfilter" => "Captcha + Spam Filter",
"shortcode" => "Shortcode",
),
)
);
Expand Down
7 changes: 6 additions & 1 deletion integrations/html-forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
if ( ! defined( 'ABSPATH' ) ) exit;

if (altcha_plugin_active('html-forms')) {
add_filter(
'hf_form_html',
'do_shortcode'
);

add_filter(
'hf_form_html',
function ($html) {
Expand All @@ -24,7 +29,7 @@ function ($error_code, $form, $data) {
$plugin = AltchaPlugin::$instance;
$mode = $plugin->get_integration_html_forms();
if (!empty($mode) && wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['_altchanonce'])), 'altcha_verification') !== false) {
if ($mode === "captcha" || $mode === "captcha_spamfilter") {
if ($mode === "captcha" || $mode === "captcha_spamfilter" || $mode === "shortcode") {
$altcha = isset($_POST['altcha']) ? trim(sanitize_text_field($_POST['altcha'])) : '';
if ($plugin->verify($altcha ) === false) {
return "altcha_invalid";
Expand Down
7 changes: 5 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.6.1
Stable tag: 1.6.1
Version: 1.7.0
Stable tag: 1.7.0
Requires at least: 5.0
Requires PHP: 7.3
Tested up to: 6.6
Expand Down Expand Up @@ -94,6 +94,9 @@ All source code for the plugin, and the ALTCHA widget is available on GitHub. In

== Changelog ==

= 1.7.0 =
* HTML Forms - add Shortcode option

= 1.6.1 =
* Fix WordPress login integration

Expand Down

0 comments on commit 50b7013

Please sign in to comment.