Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gravity Wiz // Close Comments when Post Created via Gravity Forms
/**
* Close Comments when Post Created via Gravity Forms
* http://gravitywiz.com/2012/04/25/close-comments-when-post-created-via-gravity-forms/
*/
// update the '6' to the ID of your form
add_filter('gform_post_data_6', 'gform_close_comments');
function gform_close_comments($post_data){
$post_data['comment_status'] = 'closed';
return $post_data;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.