Skip to content

Instantly share code, notes, and snippets.

@spivurno
Created September 26, 2018 11:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spivurno/7d41492281d02c167cea5f205be6295c to your computer and use it in GitHub Desktop.
Save spivurno/7d41492281d02c167cea5f205be6295c to your computer and use it in GitHub Desktop.
Gravity Perks // GP Limit Submissions // Dynamically Set Limit
<?php
/**
* Gravity Perks // GP Limit Submissions // Dynamically Set Limit
* http://gravitywiz.com/gravity-forms-limit-submissions/
*/
add_filter( 'gpls_rule_groups', function( $rule_groups ) {
foreach( $rule_groups as &$rule_group ) {
if( $rule_group->name == 'Your Feed Name' ) {
$rule_group->limit = 100;
}
}
return $rule_groups;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment