diff --git a/includes/Pods_GF.php b/includes/Pods_GF.php
index f4e66a8..9f597a1 100644
--- a/includes/Pods_GF.php
+++ b/includes/Pods_GF.php
@@ -3211,7 +3211,7 @@ public static function gf_field_input_read_only( $input_html, $field, $value, $l
if ( isset( $field['pageNumber'] ) && 0 < (int) $field['pageNumber'] && $last_page !== (int) $field['pageNumber'] ) {
self::$actioned[$form_id][__FUNCTION__] = (int) $field['pageNumber'];
- $page_header = '
' . $form['pagination']['pages'][( (int) $field['pageNumber'] - 1 )] . '
';
+ $page_header = '' . wp_kses_post( $form['pagination']['pages'][( (int) $field['pageNumber'] - 1 )] ) . '
';
}
if ( 'html' == $field_type ) {
@@ -3697,7 +3697,7 @@ public static function get_gf_field_value( $value, $params ) {
$value = $value_check;
}
} elseif ( 'us_state' === $pick_object ) {
- $value = $gf_field->get_us_state_code( $value );
+ $value_check = $gf_field->get_us_state_code( $value );
if ( $value_check ) {
$value = $value_check;
@@ -4281,7 +4281,7 @@ public function _gf_validation( $validation_result ) {
return $validation_result;
}
- if ( empty( $this->options['gf_to_pods_priority'] ) || 'validation' == $this->options['gf_to_pods_priority'] ) {
+ if ( empty( $this->options['gf_to_pods_priority'] ) || 'validation' === $this->options['gf_to_pods_priority'] ) {
try {
$this->_gf_to_pods_handler( $form );
}
@@ -4574,7 +4574,7 @@ public function _gf_after_submission( $entry, $form ) {
}
// Alternative gf_to_pods handling
- if ( ! empty( $this->options['gf_to_pods_priority'] ) && 'submission' == $this->options['gf_to_pods_priority'] ) {
+ if ( ! empty( $this->options['gf_to_pods_priority'] ) && 'submission' === $this->options['gf_to_pods_priority'] ) {
try {
$this->options['entry'] = $entry;
diff --git a/includes/Pods_GF_Addon.php b/includes/Pods_GF_Addon.php
index 5aff834..fa15536 100755
--- a/includes/Pods_GF_Addon.php
+++ b/includes/Pods_GF_Addon.php
@@ -905,7 +905,9 @@ public function process_feed( $feed, $entry, $form ) {
// Ensure other custom Pods GF submission handling does not duplicate.
remove_action( 'gform_after_submission_' . $form['id'], [ $pods_gf, '_gf_after_submission' ] );
- $id = $pods_gf->_gf_to_pods_handler( $form, $entry );
+ $pods_gf->_gf_after_submission( $entry, $form );
+
+ $id = $pods_gf->options['pod_item_id'];
// Set post_id if we have it.
if ( 'post_type' === $pods_gf->pod->pod_data['type'] ) {
@@ -1197,9 +1199,9 @@ public function setup_pods_gf( $form, $feed ) {
$options = array(
// array ( 'gf_field_id' => 'pod_field_name' )
'fields' => $fields,
- 'update_pod_item' => (int) pods_v( 'update_pod_item', $feed['meta'], 0 ),
- 'markdown' => (int) pods_v( 'enable_markdown', $feed['meta'], 0 ),
- 'auto_delete' => (int) pods_v( 'delete_entry', $feed['meta'], 0 ),
+ 'update_pod_item' => 1 === (int) pods_v( 'update_pod_item', $feed['meta'], 0 ),
+ 'markdown' => 1 === (int) pods_v( 'enable_markdown', $feed['meta'], 0 ),
+ 'auto_delete' => 1 === (int) pods_v( 'delete_entry', $feed['meta'], 0 ),
'gf_to_pods_priority' => 'submission',
);
diff --git a/package.json b/package.json
index e811fd7..1b1b248 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "pods-gravity-forms",
- "version": "1.5.0",
+ "version": "1.5.1",
"description": "PIntegration with Gravity Forms; Provides a UI for mapping a Form's submissions into a Pod.",
"author": "Pods Foundation, Inc",
"homepage": "https://pods.io/",
diff --git a/pods-gravity-forms.php b/pods-gravity-forms.php
index 9389271..06b5e46 100755
--- a/pods-gravity-forms.php
+++ b/pods-gravity-forms.php
@@ -4,13 +4,13 @@
Plugin URI: https://pods.io/
Requires Plugins: pods
Description: Integration with Gravity Forms (https://www.gravityforms.com/); Provides a UI for mapping a Form's submissions into a Pod
-Version: 1.5.0
+Version: 1.5.1
Author: Pods Framework Team
Author URI: https://pods.io/about/
Text Domain: pods-gravity-forms
GitHub Plugin URI: https://github.com/pods-framework/pods-gravity-forms
-Copyright 2013-2024 Pods Foundation, Inc (email : contact@podsfoundation.org)
+Copyright 2013-2025 Pods Foundation, Inc (email : contact@podsfoundation.org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@
* @package Pods\Gravity Forms
*/
-define( 'PODS_GF_VERSION', '1.5.0' );
+define( 'PODS_GF_VERSION', '1.5.1' );
define( 'PODS_GF_FILE', __FILE__ );
define( 'PODS_GF_DIR', plugin_dir_path( PODS_GF_FILE ) );
define( 'PODS_GF_URL', plugin_dir_url( PODS_GF_FILE ) );
@@ -80,7 +80,7 @@ function pods_gf_include_gf_addon() {
*/
function pods_gf_init() {
- if ( ! function_exists( 'pods' ) || ! class_exists( 'GFCommon' ) ) {
+ if ( ! function_exists( 'pods' ) || ! class_exists( 'GFCommon' ) || has_action( 'wp', 'pods_gf_ui_init' ) ) {
return false;
}
@@ -98,6 +98,8 @@ function pods_gf_init() {
add_action( 'wp_ajax_nopriv_pods_gf_save_for_later', 'pods_gf_save_for_later_ajax' );
}
+ return true;
+
}
add_action( 'init', 'pods_gf_init' );
@@ -126,12 +128,12 @@ function pods_gf_admin_nag() {
*/
function pods_gf_add_related_objects() {
- PodsField_Pick::$related_objects['gf-forms'] = array(
+ PodsField_Pick::$related_objects['gf-forms'] = [
'label' => __( 'Forms', 'pods' ),
'group' => __( 'Gravity Forms', 'pods' ),
'simple' => true,
'data_callback' => 'pods_gf_add_related_objects_forms',
- );
+ ];
}
@@ -152,7 +154,7 @@ function pods_gf_add_related_objects() {
*/
function pods_gf_add_related_objects_forms( $name = null, $value = null, $options = null, $pod = null, $id = null ) {
- $data = array();
+ $data = [];
// Get all forms.
$forms = RGFormsModel::get_forms( null, 'title' );
@@ -176,7 +178,7 @@ function pods_gf_add_related_objects_forms( $name = null, $value = null, $option
*/
function pods_gravity_forms_freemius() {
try {
- fs_dynamic_init( array(
+ fs_dynamic_init( [
'id' => '5754',
'slug' => 'pods-gravity-forms',
'type' => 'plugin',
@@ -184,13 +186,13 @@ function pods_gravity_forms_freemius() {
'is_premium' => false,
'has_paid_plans' => false,
'is_org_compliant' => true,
- 'parent' => array(
+ 'parent' => [
'id' => '5347',
'slug' => 'pods',
'public_key' => 'pk_737105490825babae220297e18920',
'name' => 'Pods',
- ),
- 'menu' => array(
+ ],
+ 'menu' => [
'slug' => 'pods-settings',
'contact' => false,
'support' => false,
@@ -198,13 +200,14 @@ function pods_gravity_forms_freemius() {
'account' => true,
'pricing' => false,
'addons' => true,
- 'parent' => array(
+ 'parent' => [
'slug' => 'pods',
- ),
- ),
- ) );
+ ],
+ ],
+ ] );
} catch ( \Exception $exception ) {
return;
}
}
+
add_action( 'pods_freemius_init', 'pods_gravity_forms_freemius' );
diff --git a/readme.txt b/readme.txt
index 5de4d8e..b59cde0 100755
--- a/readme.txt
+++ b/readme.txt
@@ -3,9 +3,9 @@ Contributors: sc0ttkclark, jimtrue, naomicbush, gravityplus
Donate link: https://friends.pods.io/
Tags: pods, gravity forms, form mapping
Requires at least: 6.0
-Tested up to: 6.5
+Tested up to: 6.8
Requires PHP: 7.2
-Stable tag: 1.5.0
+Stable tag: 1.5.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -113,6 +113,11 @@ function my_column_row_override( $row, $columns, $form, $gf_field, $options, $re
== Changelog ==
+= 1.5.1 - March 29th, 2024 =
+
+* Fixed: Resolved issue with auto-delete option when using Pods feeds. (@sc0ttkclark)
+* Tested against WP 6.8. (@sc0ttkclark)
+
= 1.5.0 - March 29th, 2024 =
* New requirements that match Pods: WP 6.0+, PHP 7.2+, and Pods 3.0+ to prep for Pods Gravity Forms 2.0 (@sc0ttkclark)