projects
/
WP-Themes
/
gilmoremuseum.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25a9897
)
Add filter for gravity form to not create post
author
Steve Sutton
<steve@gaslightmedia.com>
Thu, 9 Jun 2016 15:52:15 +0000
(11:52 -0400)
committer
Steve Sutton
<steve@gaslightmedia.com>
Thu, 9 Jun 2016 16:14:20 +0000
(12:14 -0400)
This will keep custom field types in gravity form from creating Untitled
post entries.
functions.php
patch
|
blob
|
history
diff --git
a/functions.php
b/functions.php
index
3dadcf8
..
ab2f4e6
100644
(file)
--- 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;
+}
+?>