Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 514b5ca03b | |||
| 714af0515a | |||
| b3bc2f2772 |
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://getcomposer.org/schema.json",
|
"$schema": "https://getcomposer.org/schema.json",
|
||||||
"name": "cleverogre/ogre-captcha",
|
"name": "cleverogre/ogre-captcha",
|
||||||
"version": "1.2.7",
|
"version": "1.2.8",
|
||||||
"title": "Ogre CAPTCHA",
|
"title": "Ogre CAPTCHA",
|
||||||
"description": "Protect your site with CAPTCHA",
|
"description": "Protect your site with CAPTCHA",
|
||||||
"author": "CleverOgre",
|
"author": "CleverOgre",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* @author cleverogre
|
* @author cleverogre
|
||||||
* @copyright 2026 CleverOgre
|
* @copyright 2026 CleverOgre
|
||||||
* @license GLP-3.0-or-later
|
* @license GLP-3.0-or-later
|
||||||
* @version 1.2.7
|
* @version 1.2.8
|
||||||
* @since 1.1.0
|
* @since 1.1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -116,9 +116,19 @@ final class Addon extends GFAddOn {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function is_enabled(array|null $form = null): bool {
|
public function is_enabled(array|null $form = null): bool {
|
||||||
|
// Check to make sure that we're enabled on the plugin level first
|
||||||
$plugin_enabled = $this->get_plugin_setting('enabled') === '1';
|
$plugin_enabled = $this->get_plugin_setting('enabled') === '1';
|
||||||
if (is_null($form) || !$plugin_enabled) return $plugin_enabled;
|
if (is_null($form) || !$plugin_enabled) return $plugin_enabled;
|
||||||
|
|
||||||
|
$form_id = !is_null($form) ? absint(rgar($form, 'id')) : 0;
|
||||||
|
|
||||||
|
// If Gravity Perks Nested Forms is active and the current form is nested, disable entirely (it's not compatible at the moment)
|
||||||
|
if (class_exists('GP_Nested_Forms')) {
|
||||||
|
$gp_nested_forms = GP_Nested_Forms::get_instance();
|
||||||
|
if ($gp_nested_forms->is_nested_form_submission() && $gp_nested_forms->get_parent_form_id() !== $form_id) return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now check to see if the opt-out is enabled within the form settings
|
||||||
$form_settings = $this->get_form_settings($form);
|
$form_settings = $this->get_form_settings($form);
|
||||||
$form_disabled = (bool) rgar($form_settings, 'disabled');
|
$form_disabled = (bool) rgar($form_settings, 'disabled');
|
||||||
return !$form_disabled;
|
return !$form_disabled;
|
||||||
@@ -160,7 +170,11 @@ final class Addon extends GFAddOn {
|
|||||||
if ($context != 'form-submit') return $validation_result;
|
if ($context != 'form-submit') return $validation_result;
|
||||||
|
|
||||||
$form = $validation_result['form'];
|
$form = $validation_result['form'];
|
||||||
|
|
||||||
|
// Make sure that we are actually processing the end of the form
|
||||||
if (!GFFormDisplay::is_last_page($form) || rgpost('action') == 'heartbeat') return $validation_result;
|
if (!GFFormDisplay::is_last_page($form) || rgpost('action') == 'heartbeat') return $validation_result;
|
||||||
|
|
||||||
|
// Make sure that we are connected and enabled
|
||||||
if (!Settings::is_connected() || !$this->is_enabled($form)) return $validation_result;
|
if (!Settings::is_connected() || !$this->is_enabled($form)) return $validation_result;
|
||||||
|
|
||||||
$errors = API::process(Widget::get_token());
|
$errors = API::process(Widget::get_token());
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@
|
|||||||
* Plugin Name: Ogre CAPTCHA
|
* Plugin Name: Ogre CAPTCHA
|
||||||
* Plugin URI: https://git.cleverogre.com/cleverogre/ogre-captcha/
|
* Plugin URI: https://git.cleverogre.com/cleverogre/ogre-captcha/
|
||||||
* Description: Protect your site with CAPTCHA
|
* Description: Protect your site with CAPTCHA
|
||||||
* Version: 1.2.7
|
* Version: 1.2.8
|
||||||
* Requires at least: 6.0
|
* Requires at least: 6.0
|
||||||
* Requires PHP: 8.2
|
* Requires PHP: 8.2
|
||||||
* Author: CleverOgre
|
* Author: CleverOgre
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "cleverogre/ogre-captcha",
|
"name": "cleverogre/ogre-captcha",
|
||||||
"version": "1.2.6",
|
"version": "1.2.7",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cleverogre/ogre-captcha",
|
"name": "cleverogre/ogre-captcha",
|
||||||
"version": "1.2.6",
|
"version": "1.2.7",
|
||||||
"license": "GPL-3.0+",
|
"license": "GPL-3.0+",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"gulp": "^5.0.0",
|
"gulp": "^5.0.0",
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://www.schemastore.org/package.json",
|
"$schema": "https://www.schemastore.org/package.json",
|
||||||
"name": "cleverogre/ogre-captcha",
|
"name": "cleverogre/ogre-captcha",
|
||||||
"version": "1.2.7",
|
"version": "1.2.8",
|
||||||
"title": "Ogre CAPTCHA",
|
"title": "Ogre CAPTCHA",
|
||||||
"description": "Protect your site with CAPTCHA",
|
"description": "Protect your site with CAPTCHA",
|
||||||
"author": "CleverOgre",
|
"author": "CleverOgre",
|
||||||
|
|||||||
+4
-1
@@ -3,7 +3,7 @@ Contributors: ogrecooper, cleverogre
|
|||||||
Tested up to: 7.0
|
Tested up to: 7.0
|
||||||
Requires at least: 6.0
|
Requires at least: 6.0
|
||||||
Requires PHP: 8.2
|
Requires PHP: 8.2
|
||||||
Version: 1.2.7
|
Version: 1.2.8
|
||||||
License: GPLv3 or later
|
License: GPLv3 or later
|
||||||
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
Copyright: CleverOgre
|
Copyright: CleverOgre
|
||||||
@@ -28,6 +28,9 @@ If you don't know what plugin you have downloaded, please contact [CleverOgre](t
|
|||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
= 1.2.8 - 2026-08-19 =
|
||||||
|
* Fix compatibility issue with Gravity Perks Nested Forms
|
||||||
|
|
||||||
= 1.2.7 - 2026-08-14 =
|
= 1.2.7 - 2026-08-14 =
|
||||||
* Remove duplicate settings link
|
* Remove duplicate settings link
|
||||||
* Add Gravity Forms section to settings page
|
* Add Gravity Forms section to settings page
|
||||||
|
|||||||
Reference in New Issue
Block a user