44Plugin URI: https://pods.io/
55Requires Plugins: pods
66Description: Integration with Gravity Forms (https://www.gravityforms.com/); Provides a UI for mapping a Form's submissions into a Pod
7- Version: 1.5.0
7+ Version: 1.5.1
88Author: Pods Framework Team
99Author URI: https://pods.io/about/
1010Text Domain: pods-gravity-forms
1111GitHub Plugin URI: https://github.com/pods-framework/pods-gravity-forms
1212
13- Copyright 2013-2024 Pods Foundation, Inc (email : contact@podsfoundation.org)
13+ Copyright 2013-2025 Pods Foundation, Inc (email : contact@podsfoundation.org)
1414
1515This program is free software; you can redistribute it and/or modify
1616it under the terms of the GNU General Public License as published by
3131 * @package Pods\Gravity Forms
3232 */
3333
34- define ( 'PODS_GF_VERSION ' , '1.5.0 ' );
34+ define ( 'PODS_GF_VERSION ' , '1.5.1 ' );
3535define ( 'PODS_GF_FILE ' , __FILE__ );
3636define ( 'PODS_GF_DIR ' , plugin_dir_path ( PODS_GF_FILE ) );
3737define ( 'PODS_GF_URL ' , plugin_dir_url ( PODS_GF_FILE ) );
@@ -80,7 +80,7 @@ function pods_gf_include_gf_addon() {
8080 */
8181function pods_gf_init () {
8282
83- if ( ! function_exists ( 'pods ' ) || ! class_exists ( 'GFCommon ' ) ) {
83+ if ( ! function_exists ( 'pods ' ) || ! class_exists ( 'GFCommon ' ) || has_action ( ' wp ' , ' pods_gf_ui_init ' ) ) {
8484 return false ;
8585 }
8686
@@ -98,6 +98,8 @@ function pods_gf_init() {
9898 add_action ( 'wp_ajax_nopriv_pods_gf_save_for_later ' , 'pods_gf_save_for_later_ajax ' );
9999 }
100100
101+ return true ;
102+
101103}
102104
103105add_action ( 'init ' , 'pods_gf_init ' );
@@ -126,12 +128,12 @@ function pods_gf_admin_nag() {
126128 */
127129function pods_gf_add_related_objects () {
128130
129- PodsField_Pick::$ related_objects ['gf-forms ' ] = array (
131+ PodsField_Pick::$ related_objects ['gf-forms ' ] = [
130132 'label ' => __ ( 'Forms ' , 'pods ' ),
131133 'group ' => __ ( 'Gravity Forms ' , 'pods ' ),
132134 'simple ' => true ,
133135 'data_callback ' => 'pods_gf_add_related_objects_forms ' ,
134- ) ;
136+ ] ;
135137
136138}
137139
@@ -152,7 +154,7 @@ function pods_gf_add_related_objects() {
152154 */
153155function pods_gf_add_related_objects_forms ( $ name = null , $ value = null , $ options = null , $ pod = null , $ id = null ) {
154156
155- $ data = array () ;
157+ $ data = [] ;
156158
157159 // Get all forms.
158160 $ forms = RGFormsModel::get_forms ( null , 'title ' );
@@ -176,35 +178,36 @@ function pods_gf_add_related_objects_forms( $name = null, $value = null, $option
176178 */
177179function pods_gravity_forms_freemius () {
178180 try {
179- fs_dynamic_init ( array (
181+ fs_dynamic_init ( [
180182 'id ' => '5754 ' ,
181183 'slug ' => 'pods-gravity-forms ' ,
182184 'type ' => 'plugin ' ,
183185 'public_key ' => 'pk_1aaaee6bf8963f2077405e84f2ac5 ' ,
184186 'is_premium ' => false ,
185187 'has_paid_plans ' => false ,
186188 'is_org_compliant ' => true ,
187- 'parent ' => array (
189+ 'parent ' => [
188190 'id ' => '5347 ' ,
189191 'slug ' => 'pods ' ,
190192 'public_key ' => 'pk_737105490825babae220297e18920 ' ,
191193 'name ' => 'Pods ' ,
192- ) ,
193- 'menu ' => array (
194+ ] ,
195+ 'menu ' => [
194196 'slug ' => 'pods-settings ' ,
195197 'contact ' => false ,
196198 'support ' => false ,
197199 'affiliation ' => false ,
198200 'account ' => true ,
199201 'pricing ' => false ,
200202 'addons ' => true ,
201- 'parent ' => array (
203+ 'parent ' => [
202204 'slug ' => 'pods ' ,
203- ) ,
204- ) ,
205- ) );
205+ ] ,
206+ ] ,
207+ ] );
206208 } catch ( \Exception $ exception ) {
207209 return ;
208210 }
209211}
212+
210213add_action ( 'pods_freemius_init ' , 'pods_gravity_forms_freemius ' );
0 commit comments