From: Steve Sutton Date: Thu, 9 Jun 2016 15:52:15 +0000 (-0400) Subject: Add filter for gravity form to not create post X-Git-Tag: v1.2.31^2~1^2~8 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=c2af39bb15887c5d3c0f4a393d3d133b76244db6;p=WP-Themes%2Fgilmoremuseum.git Add filter for gravity form to not create post This will keep custom field types in gravity form from creating Untitled post entries. --- 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; +} +?>