From c2af39bb15887c5d3c0f4a393d3d133b76244db6 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 9 Jun 2016 11:52:15 -0400 Subject: [PATCH] Add filter for gravity form to not create post This will keep custom field types in gravity form from creating Untitled post entries. --- functions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index 3dadcf8..ab2f4e6 100644 --- a/functions.php +++ b/functions.php @@ -279,4 +279,8 @@ function woo_related_products_limit() { $args['posts_per_page'] = 4; return $args; } -?> \ No newline at end of file +add_filter( 'gform_disable_post_creation', 'disable_post_creation', 10, 3 ); +function disable_post_creation( $is_disabled, $form, $entry ) { + return true; +} +?> -- 2.17.1