From 64aea93c4d2eddfa684c014bc5feacbcadd37cb0 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 9 Jun 2016 11:40:54 -0400 Subject: [PATCH] Adding filter to keep gravity forms from creating post entries If we we custom fields they will create a post entry. This will keep any form from adding one. --- functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index 1a24888..88636b1 100644 --- a/functions.php +++ b/functions.php @@ -388,5 +388,8 @@ function glm_per_product_rates_only( $rates, $package ) { return $rates; } - +add_filter( 'gform_disable_post_creation', 'disable_post_creation', 10, 3 ); +function disable_post_creation( $is_disabled, $form, $entry ) { + return true; +} ?> -- 2.17.1